Skip to content

Commit

Permalink
Conditionally run the whole publish.
Browse files Browse the repository at this point in the history
  • Loading branch information
adiroiban committed Jun 5, 2023
1 parent 6b9b85a commit 13e6d0c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,9 @@ jobs:


pypi-publish:
# https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert
name: Check tag and publish
# Only trigger this for tag changes.
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
environment: release-pypi
permissions:
Expand Down Expand Up @@ -226,11 +227,9 @@ jobs:
run: ls --recursive dist/

- name: Check matched tag version and branch version - on tag
if: startsWith(github.ref, 'refs/tags/')
run: python admin/check_tag_version_match.py "${{ github.ref }}"

- name: Publish to PyPI - on tag
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@a56da0b891b3dc519c7ee3284aff1fad93cc8598


Expand Down

0 comments on commit 13e6d0c

Please sign in to comment.