Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/publish_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,25 @@ jobs:
echo "match=false" >> $GITHUB_OUTPUT
fi

# Prod, 'rc' and 'beta' tags go to PyPI; 'alpha', all other tags and untagged commits go to TestPyPI
# Prod, 'rc', 'beta', and 'alpha' tags go to PyPI; all other tags and untagged commits go to TestPyPI
# 2.10.0 (prod tag, official release commit) --> PyPI
# 2.10.0b1 (beta tag, used on main) --> PyPI
# 2.10.0.rc0 (rc tag, used on release branches before release is cut) --> PyPI
# 2.10.0.a0 (alpha tag, used on feature branches) --> TestPyPI
# 2.10.0rc0 (rc tag, used on release branches before release is cut) --> PyPI
# 2.10.0a0 (alpha tag, used on feature branches) --> PyPI (as pre-release)
# 2.10.0.dev0 (no match, arbitrary dev tag) --> TestPyPI
# no tag, just a vanilla commit/merge pushed to `main` --> TestPyPI

# Upload to TestPyPI if it is not a release (prod), rc or beta tag
# Upload to TestPyPI if it is not a release (prod), rc, beta, or alpha tag
- name: Upload to test pypi
if: steps.check-prod-tag.outputs.match == 'false' && steps.check-rc-tag.outputs.match == 'false' && steps.check-beta-tag.outputs.match == 'false'
if: steps.check-prod-tag.outputs.match == 'false' && steps.check-rc-tag.outputs.match == 'false' && steps.check-beta-tag.outputs.match == 'false' && steps.check-alpha-tag.outputs.match == 'false'
run: twine upload --verbose --repository testpypi dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}

# If the tag matches either a release, rc or a beta tag, allow publishing to PyPi:
# If the tag matches a release, rc, beta, or alpha tag, allow publishing to PyPI:
- name: Upload to pypi
if: steps.check-prod-tag.outputs.match == 'true' || steps.check-rc-tag.outputs.match == 'true' || steps.check-beta-tag.outputs.match == 'true'
if: steps.check-prod-tag.outputs.match == 'true' || steps.check-rc-tag.outputs.match == 'true' || steps.check-beta-tag.outputs.match == 'true' || steps.check-alpha-tag.outputs.match == 'true'
run: twine upload --verbose dist/*
env:
TWINE_USERNAME: __token__
Expand Down
Loading