@@ -4,6 +4,8 @@ name: Python client checks, package build and deployment
4
4
on :
5
5
workflow_dispatch :
6
6
push :
7
+ tags :
8
+ - ' client-*'
7
9
branches :
8
10
- develop
9
11
- master
@@ -36,58 +38,14 @@ jobs:
36
38
- name : Mypy type checking
37
39
run : (cd client && mypy src/)
38
40
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
-
83
41
packaging :
84
42
needs : [lint, mypy]
85
43
name : Build, test and deploy the Python package
86
44
uses : LedgerHQ/ledger-app-workflows/.github/workflows/reusable_pypi_deployment.yml@v1
87
45
with :
88
46
package_directory : " client/"
89
47
stable_deployment : true
90
- check_changelog_version : true
48
+ check_changelog_version : ${{ startsWith(github.ref,'refs/tags/') }}
91
49
publish : ${{ github.event_name == 'push' }}
92
50
secrets :
93
51
pypi_token : secrets.PYPI_PUBLIC_API_TOKEN
0 commit comments