Fix tag syntax in workflow yaml

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
This commit is contained in:
Dan Ryan
2020-04-28 20:35:17 -04:00
parent cac14da5e8
commit 4e7b6e6093
+13 -7
View File
@@ -1,13 +1,13 @@
name: Create Release & Upload To PyPI
name: Upload Python Package
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- v?[0-9]+.[0-9]+.[0-9]+.?(a|b|rc|dev)?[0-9]+ # add .* to allow dev releases
- v[0-9]+.[0-9]+.* # add .* to allow dev releases
jobs:
build:
deploy:
name: pipenv PyPI Upload
runs-on: ubuntu-latest
env:
@@ -15,7 +15,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v2
- uses: webfactory/ssh-agent@v0.1.1
with:
@@ -37,14 +37,18 @@ jobs:
with:
python-version: 3.7
- name: Install latest tools for build
- name: Install dependencies
run: |
python -m pip install --upgrade --upgrade-strategy=eager pip setuptools wheel invoke
python -m pip install --upgrade --upgrade-strategy=eager pip setuptools wheel twine
python -m pip install .
python -m pipenv install --dev
env:
PIPENV_PYTHON: "3.7"
- name: Build wheels
run: |
python -m pipenv runpython setup.py sdist bdist_wheel
python -m pipenv run python setup.py sdist bdist_wheel
# to upload to test pypi, pass repository_url: https://test.pypi.org/legacy/ and use secrets.TEST_PYPI_TOKEN
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
@@ -53,6 +57,7 @@ jobs:
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
packages_dir: dist/
# git push https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:master
# we need to use a deploy key for this to get around branch protection as the default token fails
- name: Pre-bump
@@ -61,3 +66,4 @@ jobs:
git config --local user.email action@github.com
python -m pipenv run inv release.bump-version --dev --commit
git push git@github.com:${{ github.repository }}.git HEAD:master