From f3ca0ecdc0c1948c718ec34cafb0f721e9f508ea Mon Sep 17 00:00:00 2001 From: Mathias BROUSSET Date: Wed, 14 Jan 2026 18:35:16 +0100 Subject: [PATCH 1/4] replace deploy job with reusable workflow --- .github/workflows/ci.yml | 108 ++++----------------------------------- 1 file changed, 10 insertions(+), 98 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab6feda..c5d60bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,104 +40,16 @@ jobs: name: codecov-ledgerwallet deploy: - name: Build the Python package and deploy if needed + name: Build and deploy ledgerwallet package runs-on: public-ledgerhq-shared-small needs: [build_install_test] - permissions: - id-token: write - attestations: write - contents: write - steps: - - name: Clone - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Install dependencies - run: | - # Needed to workaround this bug https://github.com/pypa/setuptools/issues/4759 - # To be removed when it's fixed - pip install -U packaging - - python -m pip install pip --upgrade - pip install build twine - - - name: Build the Python package - run: | - python -m build - twine check dist/* - echo "TAG_VERSION=$(python -c 'from ledgerwallet import __version__; print(__version__)')" >> "$GITHUB_ENV" - - - name: Display current status - run: | - echo "Current status is:" - if [[ ${{ github.ref }} == "refs/tags/"* ]]; \ - then \ - echo "- Triggered from tag, will be deployed on pypi.org"; \ - else \ - echo "- Not triggered from tag, will be deployed on test.pypi.org"; \ - fi - echo "- Tag version: ${{ env.TAG_VERSION }}" - - - name: Check version against CHANGELOG - if: startsWith(github.ref, 'refs/tags/') - run: | - CHANGELOG_VERSION=$(grep -Po '(?<=## \[)(\d+\.)+[^\]]' CHANGELOG.md | head -n 1) - if [ "${{ env.TAG_VERSION }}" == "${CHANGELOG_VERSION}" ]; \ - then \ - exit 0; \ - else \ - echo "Tag '${{ env.TAG_VERSION }}' and CHANGELOG '${CHANGELOG_VERSION}' versions mismatch!"; \ - exit 1; \ - fi + uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_pypi_deployment.yml@v1 + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + with: + package_name: ledgerwallet + jfrog_deployment: true + release: true + publish: true + secrets: + pypi_token: ${{ secrets.PYPI_PUBLIC_API_TOKEN }} - - name: Publish Python package on pypi.org - if: success() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - run: python -m twine upload dist/* --verbose - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_PUBLIC_API_TOKEN }} - TWINE_NON_INTERACTIVE: 1 - - - name: Login to Ledger Artifactory - if: success() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - timeout-minutes: 10 - id: jfrog-login - uses: LedgerHQ/actions-security/actions/jfrog-login@actions/jfrog-login-1 - - - name: Publish Python package on Ledger Artifactory - if: success() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - run: python -m twine upload dist/* - env: - TWINE_REPOSITORY_URL: https://jfrog.ledgerlabs.net/artifactory/api/pypi/embedded-apps-pypi-prod-green - TWINE_USERNAME: ${{ steps.jfrog-login.outputs.oidc-user }} - TWINE_PASSWORD: ${{ steps.jfrog-login.outputs.oidc-token }} - TWINE_NON_INTERACTIVE: 1 - - - name: Generate library build attestations - if: success() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - timeout-minutes: 10 - uses: LedgerHQ/actions-security/actions/attest@actions/attest-1 - with: - subject-path: dist/* - - - name: Sign library artifacts - if: success() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - timeout-minutes: 10 - uses: LedgerHQ/actions-security/actions/sign-blob@actions/sign-blob-1 - with: - path: dist - - - name: Publish a release on the repo - if: | - success() && - github.event_name == 'push' && - startsWith(github.ref, 'refs/tags/') - uses: "marvinpinto/action-automatic-releases@latest" - with: - automatic_release_tag: "v${{ env.TAG_VERSION }}" - repo_token: "${{ secrets.GITHUB_TOKEN }}" - prerelease: true - files: | - LICENSE - dist/ From 66be9618a376be9d39b339c99ab99a858e14171f Mon Sep 17 00:00:00 2001 From: Mathias BROUSSET Date: Thu, 15 Jan 2026 11:40:53 +0100 Subject: [PATCH 2/4] add actionlint --- .github/workflows/ci.yml | 1 - .pre-commit-config.yaml | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5d60bf..8e352be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,6 @@ jobs: deploy: name: Build and deploy ledgerwallet package - runs-on: public-ledgerhq-shared-small needs: [build_install_test] uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_pypi_deployment.yml@v1 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8b90e0c..0cdcdd7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,3 +46,9 @@ repos: rev: 5.12.0 hooks: - id: isort + + - repo: https://github.com/rhysd/actionlint + rev: v1.6.27 + hooks: + - id: actionlint + files: ^\.github/workflows/.*\.ya?ml$ From 3714e2704c0a84a3844a1fdf5d6296056af2dc24 Mon Sep 17 00:00:00 2001 From: Miguel Ruiz de Sotto Date: Wed, 10 Dec 2025 11:28:15 +0100 Subject: [PATCH 3/4] [fix] apiLevel=0 is 'falsy' --- ledgerwallet/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ledgerwallet/client.py b/ledgerwallet/client.py index 5c2b0f3..5cc5a63 100644 --- a/ledgerwallet/client.py +++ b/ledgerwallet/client.py @@ -266,7 +266,7 @@ def install_app(self, app_manifest: AppManifest): main_address = hex_file.start_addr["EIP"] - hex_file.minaddr() level = app_manifest.get_api_level(device) - if level: + if level is not None: data = struct.pack( ">BIIIII", level, From 64ba338a7784ecbbb0b7df4bfc917c6e9fedd3c7 Mon Sep 17 00:00:00 2001 From: GroM Date: Tue, 24 Feb 2026 18:29:48 +0100 Subject: [PATCH 4/4] Update CHANGELOG.md --- .github/workflows/ci.yml | 1 - CHANGELOG.md | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e352be..1d23f36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,4 +51,3 @@ jobs: publish: true secrets: pypi_token: ${{ secrets.PYPI_PUBLIC_API_TOKEN }} - diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c1c8ba..b947a03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.5.6] - 2026-02-24 + +### Fixed + +- Fix api-level 0 handling +- Update deployment workflows + ## [0.5.5] - 2025-11-26 ### Fixed