From 9ad654f766251304914347e9005a98c6896b5e3f Mon Sep 17 00:00:00 2001 From: kchason Date: Fri, 17 Jun 2022 08:30:21 -0400 Subject: [PATCH 1/2] Switch release tracking logic --- .github/workflows/cicd.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 97df165..9103b7f 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -13,9 +13,16 @@ name: Continuous Integration on: push: - branches: [ main, develop ] + branches: + - main + - develop pull_request: - branches: [ main, develop ] + branches: + - main + - develop + release: + types: + - published jobs: build: @@ -23,7 +30,9 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.7', '3.10' ] + python-version: + - '3.7' + - '3.10' steps: - uses: actions/checkout@v2 @@ -65,5 +74,5 @@ jobs: # If this commit is the result of a Git tag, push the wheel and tar packages # to the PyPi registry - name: Publish to PyPI - if: startsWith(github.ref, 'refs/tags') + if: github.event_name == 'release' && github.event.action == 'created' run: twine upload --repository-url https://upload.pypi.org/legacy/ -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --skip-existing --verbose dist/* From 828b19d59e3b647689f9fecffa7988c340c547f0 Mon Sep 17 00:00:00 2001 From: kchason Date: Fri, 17 Jun 2022 08:31:35 -0400 Subject: [PATCH 2/2] Switch action check --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 9103b7f..5fe50c4 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -74,5 +74,5 @@ jobs: # If this commit is the result of a Git tag, push the wheel and tar packages # to the PyPi registry - name: Publish to PyPI - if: github.event_name == 'release' && github.event.action == 'created' + if: github.event_name == 'release' && github.event.action == 'published' run: twine upload --repository-url https://upload.pypi.org/legacy/ -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --skip-existing --verbose dist/*