Skip to content

Commit 4e7b6e6

Browse files
committed
Fix tag syntax in workflow yaml
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
1 parent cac14da commit 4e7b6e6

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/pypi_upload.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
name: Create Release & Upload To PyPI
1+
name: Upload Python Package
22

33
on:
44
push:
55
# Sequence of patterns matched against refs/tags
66
tags:
7-
- v?[0-9]+.[0-9]+.[0-9]+.?(a|b|rc|dev)?[0-9]+ # add .* to allow dev releases
7+
- v[0-9]+.[0-9]+.* # add .* to allow dev releases
88

99
jobs:
10-
build:
10+
deploy:
1111
name: pipenv PyPI Upload
1212
runs-on: ubuntu-latest
1313
env:
1414
CI: "1"
1515

1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@v1
18+
uses: actions/checkout@v2
1919

2020
- uses: webfactory/ssh-agent@v0.1.1
2121
with:
@@ -37,14 +37,18 @@ jobs:
3737
with:
3838
python-version: 3.7
3939

40-
- name: Install latest tools for build
40+
- name: Install dependencies
4141
run: |
42-
python -m pip install --upgrade --upgrade-strategy=eager pip setuptools wheel invoke
42+
python -m pip install --upgrade --upgrade-strategy=eager pip setuptools wheel twine
4343
python -m pip install .
4444
python -m pipenv install --dev
45+
env:
46+
PIPENV_PYTHON: "3.7"
47+
4548
- name: Build wheels
4649
run: |
47-
python -m pipenv runpython setup.py sdist bdist_wheel
50+
python -m pipenv run python setup.py sdist bdist_wheel
51+
4852
# to upload to test pypi, pass repository_url: https://test.pypi.org/legacy/ and use secrets.TEST_PYPI_TOKEN
4953
- name: Publish a Python distribution to PyPI
5054
uses: pypa/gh-action-pypi-publish@master
@@ -53,6 +57,7 @@ jobs:
5357
password: ${{ secrets.TEST_PYPI_TOKEN }}
5458
repository_url: https://test.pypi.org/legacy/
5559
packages_dir: dist/
60+
5661
# git push https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:master
5762
# we need to use a deploy key for this to get around branch protection as the default token fails
5863
- name: Pre-bump
@@ -61,3 +66,4 @@ jobs:
6166
git config --local user.email action@github.com
6267
python -m pipenv run inv release.bump-version --dev --commit
6368
git push git@github.com:${{ github.repository }}.git HEAD:master
69+

0 commit comments

Comments
 (0)