Skip to content

Commit

Permalink
[ci][add] Using the 'reusable_pypi_deployment' workflow for Pytho pac…
Browse files Browse the repository at this point in the history
…kage deployment
  • Loading branch information
lpascal-ledger committed Aug 7, 2023
1 parent 54b9791 commit 7258626
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/python-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ on:
branches:
- develop
- master
paths:
- ./client/
- .github/workflows/python-client.yml
pull_request:
paths:
- ./client/
- .github/workflows/python-client.yml

jobs:
lint:
Expand All @@ -29,15 +35,15 @@ jobs:
- name: Mypy type checking
run: (cd client && mypy src/)

build:
name: Building the package
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v3
- run: pip install --upgrade pip build twine
- name: Build and test the package
run: |
cd client/
python -m build .
python -m twine check dist/*
packaging:
needs: [lint, mypy]
if: github.event_name == 'push'
name: Build, test and deploy the Python package
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_pypi_deployment.yml@v1
with:
package_directory: "client/"
stable_deployment: ${{ github.ref == 'refs/heads/master' }}
check_changelog_version: true
publish: ${{ github.event_name == 'push' }}
secrets:
pypi_token: ${{ github.ref == 'refs/heads/master' && secrets.PYPI_PUBLIC_API_TOKEN || secrets.TEST_PYPI_PUBLIC_API_TOKEN }}

0 comments on commit 7258626

Please sign in to comment.