Skip to content

Commit 651e4e3

Browse files
committed
adds if case to publish either to pypi or testpypi
1 parent 22e9cf2 commit 651e4e3

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Publish
22
on:
33
release:
44
types: [published]
5-
push:
65

76
jobs:
87
publish:
@@ -35,6 +34,10 @@ jobs:
3534
- name: Publish to PyPi
3635
env:
3736
TWINE_USERNAME: __token__
38-
TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }}
39-
run: twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose
37+
run: |
38+
if [[ "${{ github.event.release.name }}" == *"alpha"* || "${{ github.event.release.name }}" == *"beta"* ]]; then
39+
TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose
40+
else
41+
TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} twine upload dist/* --verbose
42+
fi
4043
working-directory: xero-python

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ def read_file(filename):
4848
keywords="xero python sdk API oAuth",
4949
name="xero_python",
5050
packages=find_packages(include=["xero_python", "xero_python.*"]),
51-
version="6.3.0-alpha.7",
51+
version="6.3.0-alpha.8",
5252
)

0 commit comments

Comments
 (0)