Skip to content

Commit

Permalink
Merge pull request #11 from LedgerHQ/zipapp
Browse files Browse the repository at this point in the history
feat(BACK-7721): package and distribute linter as a zipapp
  • Loading branch information
jnicoulaud-ledger authored Sep 23, 2024
2 parents 3ef1679 + 01c9409 commit 3a89b1e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ jobs:
env:
FURY_TOKEN: ${{ secrets.PYPI_DEPLOY_TOKEN}}

- name: Build distribution artifacts
- name: Build library artifacts
timeout-minutes: 10
run: pdm build

- name: Build standalone application
timeout-minutes: 10
run: pdm exe

- name: Generate build attestations
timeout-minutes: 10
uses: LedgerHQ/actions-security/actions/attest@actions/attest-1
Expand All @@ -50,10 +54,20 @@ jobs:
with:
path: dist

- name: Upload distribution artifacts to Ledger Artifactory repository
- name: Upload library artifacts to Ledger Artifactory repository
timeout-minutes: 10
env:
PDM_PUBLISH_REPO: https://jfrog.ledgerlabs.net/artifactory/api/pypi/vault-pypi-prod-green
PDM_PUBLISH_USERNAME: ${{ steps.jfrog-login.outputs.oidc-user }}
PDM_PUBLISH_PASSWORD: ${{ steps.jfrog-login.outputs.oidc-token }}
run: pdm publish --no-build

- name: Attach standalone application to Github release
uses: svenstaro/upload-release-action@v2
timeout-minutes: 10
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: dist/erc7730
asset_name: erc7730
overwrite: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ tests/**/*.xml
outputs/**/*.html
exports
dist/
build/
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ test.help = "Run unit/integration tests suite"
test.shell = "pytest tests"
all.help = "Run lint+test"
all.shell = { composite = ["lint", "test"] }
exe.help = "Package the application into a standalone executable"
exe.shell = "pdm pack --compress --exe --interpreter '/usr/bin/env python3' --output dist/erc7730"

[tool.pdm]
plugins = ["sync-pre-commit-lock"]
plugins = ["sync-pre-commit-lock", "pdm-packer"]

[tool.pdm.dev-dependencies]
dev = [
Expand Down

0 comments on commit 3a89b1e

Please sign in to comment.