Skip to content

Commit 6c87036

Browse files
committed
[ci][add] Push on Artifactory Python registry
1 parent 15c255a commit 6c87036

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 1 deletion
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
@@ -77,6 +82,35 @@ jobs:
7782
TWINE_PASSWORD: ${{ secrets.PYPI_PUBLIC_API_TOKEN }}
7883
TWINE_NON_INTERACTIVE: 1
7984

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
92+
if: success() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
93+
run: python -m twine upload dist/*
94+
env:
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 }}
98+
TWINE_NON_INTERACTIVE: 1
99+
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+
80114
- name: Publish a release on the repo
81115
if: |
82116
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)