Skip to content

Commit

Permalink
Fix tag syntax in workflow yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Ryan <[email protected]>
  • Loading branch information
techalchemy committed Apr 29, 2020
1 parent cac14da commit 4e7b6e6
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/pypi_upload.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
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:
CI: "1"

steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v2

- uses: webfactory/[email protected]
with:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -61,3 +66,4 @@ jobs:
git config --local user.email [email protected]
python -m pipenv run inv release.bump-version --dev --commit
git push [email protected]:${{ github.repository }}.git HEAD:master

0 comments on commit 4e7b6e6

Please sign in to comment.