-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from XeroAPI/PETOSS-534-Publish-Python-SDK-af…
…ter-manual-release-from-GitHub Petoss 534 publish python sdk after manual release from GitHub
- Loading branch information
Showing
2 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Publish | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout xero-python repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: XeroAPI/xero-python | ||
path: xero-python | ||
|
||
- name: Set up Python environment | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.8' | ||
cache: 'pip' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip install --upgrade pip | ||
sudo pip install twine | ||
working-directory: xero-python | ||
|
||
- name: Build Package | ||
run: python setup.py sdist | ||
working-directory: xero-python | ||
|
||
- name: Publish to PyPi | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} | ||
run: twine upload --repository-url https://test.pypi.org/legacy/ dist/* | ||
working-directory: xero-python |