@@ -4,6 +4,8 @@ name: Python client checks, package build and deployment
44on :
55 workflow_dispatch :
66 push :
7+ tags :
8+ - ' client-*'
79 branches :
810 - develop
911 - master
@@ -36,58 +38,14 @@ jobs:
3638 - name : Mypy type checking
3739 run : (cd client && mypy src/)
3840
39- get-develop-version :
40- name : Get develop version
41- runs-on : ubuntu-latest
42- if : ${{ github.event_name == 'pull_request' && github.base_ref == 'develop' }}
43- outputs :
44- develop_version : ${{ steps.get-version.outputs.develop_version }}
45- steps :
46- - name : Check Out Code
47- uses : actions/checkout@v3
48- with :
49- ref : develop
50- - name : Set up Python
51- uses : actions/setup-python@v4
52- with :
53- python-version : 3.12.0
54- - name : Get version
55- id : get-version
56- env :
57- PYTHONPATH : client/src/ledger_app_clients
58- run : |
59- echo "develop_version=$(python -c 'from ethereum import __version__; print(__version__)')" >> $GITHUB_OUTPUT
60-
61- version-check :
62- name : Check Version when opening a PR against develop
63- runs-on : ubuntu-latest
64- needs : get-develop-version
65- steps :
66- - name : Check Out Code
67- uses : actions/checkout@v3
68- - name : Set up Python
69- uses : actions/setup-python@v4
70- with :
71- python-version : 3.12.0
72- - name : Check Version Bump
73- env :
74- DEVELOP_VERSION : ${{needs.get-develop-version.outputs.develop_version}}
75- PYTHONPATH : client/src/ledger_app_clients
76- run : |
77- current_version=$(python -c "from ethereum import __version__; print(__version__)")
78- if [[ "$current_version" == "$DEVELOP_VERSION" ]]; then
79- echo "Version in __init__.py hasn't been bumped. Please bump the version before merging."
80- exit 1
81- fi
82-
8341 packaging :
8442 needs : [lint, mypy]
8543 name : Build, test and deploy the Python package
8644 uses : LedgerHQ/ledger-app-workflows/.github/workflows/reusable_pypi_deployment.yml@v1
8745 with :
8846 package_directory : " client/"
8947 stable_deployment : true
90- check_changelog_version : true
48+ check_changelog_version : ${{ startsWith(github.ref,'refs/tags/') }}
9149 publish : ${{ github.event_name == 'push' }}
9250 secrets :
9351 pypi_token : secrets.PYPI_PUBLIC_API_TOKEN
0 commit comments