Skip to content

Commit

Permalink
adds if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
billbrod committed Feb 28, 2024
1 parent d91bd82 commit 3320e78
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
[[ $(find dist/ -type f -name "*tar.gz" -printf x | wc -c) == 1 ]] || exit 1
- name: Check setuptools_scm version against git tag
shell: bash
# this won't work if we use workflow dispatch, so no sense in running
# it.
if: github.event_name == 'release' && github.event.action == 'published'
run: |
# we use the error code of this comparison: =~ is bash's regex
# operator, so it checks whether the right side is contained in the
Expand Down Expand Up @@ -82,6 +85,10 @@ jobs:
name: artifact
path: dist
- name: Publish package to test pypi
if: github.event_name == 'release' && github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
- name: Publish package to real pypi
if: github.event_name == 'workflow_dispatch'
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 3320e78

Please sign in to comment.