Skip to content

Commit

Permalink
adds if case to publish either to pypi or testpypi
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshk-tw committed Oct 22, 2024
1 parent 22e9cf2 commit 651e4e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Publish
on:
release:
types: [published]
push:

jobs:
publish:
Expand Down Expand Up @@ -35,6 +34,10 @@ jobs:
- name: Publish to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }}
run: twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose
run: |
if [[ "${{ github.event.release.name }}" == *"alpha"* || "${{ github.event.release.name }}" == *"beta"* ]]; then
TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose
else
TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} twine upload dist/* --verbose
fi
working-directory: xero-python
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ def read_file(filename):
keywords="xero python sdk API oAuth",
name="xero_python",
packages=find_packages(include=["xero_python", "xero_python.*"]),
version="6.3.0-alpha.7",
version="6.3.0-alpha.8",
)

0 comments on commit 651e4e3

Please sign in to comment.