Skip to content

Commit c3609d5

Browse files
authored
Merge pull request #145 from LedgerHQ/jfrog
Package pushed on JFrog
2 parents d453c78 + 6c87036 commit c3609d5

2 files changed

Lines changed: 35 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
pull_request:
1111
branches:
1212
- master
13+
- develop
14+
15+
permissions:
16+
id-token: write
17+
attestations: write
1318

1419
jobs:
1520
build_install:
@@ -35,7 +40,7 @@ jobs:
3540
3641
package-deploy:
3742
name: Build the Python package, and deploy if needed
38-
runs-on: ubuntu-latest
43+
runs-on: public-ledgerhq-shared-small
3944
needs: build_install
4045
steps:
4146
- name: Clone
@@ -69,22 +74,43 @@ jobs:
6974
fi
7075
echo "- Tag version: ${{ env.TAG_VERSION }}";
7176
72-
- name: Publish Python package on test.pypi.org
73-
if: success() && github.event_name == 'push'
74-
run: python -m twine upload --repository testpypi dist/*
77+
- name: Publish Python package on pypi.org
78+
if: success() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
79+
run: python -m twine upload dist/*
7580
env:
7681
TWINE_USERNAME: __token__
77-
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PUBLIC_API_TOKEN }}
82+
TWINE_PASSWORD: ${{ secrets.PYPI_PUBLIC_API_TOKEN }}
7883
TWINE_NON_INTERACTIVE: 1
7984

80-
- name: Publish Python package on pypi.org
85+
- name: Login to Ledger Artifactory
86+
if: success() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
87+
timeout-minutes: 10
88+
id: jfrog-login
89+
uses: LedgerHQ/actions-security/actions/jfrog-login@actions/jfrog-login-1
90+
91+
- name: Publish Python package on Ledger Artifactory
8192
if: success() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
8293
run: python -m twine upload dist/*
8394
env:
84-
TWINE_USERNAME: __token__
85-
TWINE_PASSWORD: ${{ secrets.PYPI_PUBLIC_API_TOKEN }}
95+
TWINE_REPOSITORY_URL: https://jfrog.ledgerlabs.net/artifactory/api/pypi/embedded-apps-pypi-prod-green
96+
TWINE_USERNAME: ${{ steps.jfrog-login.outputs.oidc-user }}
97+
TWINE_PASSWORD: ${{ steps.jfrog-login.outputs.oidc-token }}
8698
TWINE_NON_INTERACTIVE: 1
8799

100+
- name: Generate library build attestations
101+
if: success() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
102+
timeout-minutes: 10
103+
uses: LedgerHQ/actions-security/actions/attest@actions/attest-1
104+
with:
105+
subject-path: dist/*
106+
107+
- name: Sign library artifacts
108+
if: success() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
109+
timeout-minutes: 10
110+
uses: LedgerHQ/actions-security/actions/sign-blob@actions/sign-blob-1
111+
with:
112+
path: dist
113+
88114
- name: Publish a release on the repo
89115
if: |
90116
success() &&

.github/workflows/documentation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
pull_request:
1010
branches:
1111
- master
12+
- develop
1213

1314
jobs:
1415
generate:

0 commit comments

Comments
 (0)