-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vignesh Kennadi
committed
Sep 26, 2024
1 parent
553c0ab
commit db2412c
Showing
2 changed files
with
45 additions
and
44 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,45 @@ | ||
name: Deploy | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
deploy: | ||
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 | ||
pip install black | ||
sudo pip install flake8 | ||
pip install -r requirements.txt -r requirements/dev.txt | ||
working-directory: xero-python | ||
|
||
- name: Build new package version | ||
run: python setup.py sdist | ||
working-directory: xero-python | ||
|
||
- name: Verify new package version | ||
run: ls -al dist | ||
working-directory: xero-python | ||
|
||
- name: Deploy to test 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 |