Skip to content

Commit 04473c0

Browse files
ci: cleaning and deploy jfrog-related publication reusable wokflow (#31)
- publishing push-master to dev repo - publishing releases to prod-public repo
2 parents 38686ca + d276aa4 commit 04473c0

File tree

2 files changed

+39
-36
lines changed

2 files changed

+39
-36
lines changed

.github/workflows/publish-to-jfrog.yml

+14-36
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,22 @@
55
name: Upload Python Package to jfrog
66

77
on:
8-
release:
9-
types: [released]
10-
workflow_dispatch:
8+
push:
9+
branches:
10+
- main
1111

1212
jobs:
13-
deploy:
14-
runs-on: outpost-os-shared-small
15-
environment: ledger-publish
16-
13+
publish:
1714
permissions:
1815
id-token: write
1916
contents: read
20-
21-
steps:
22-
- name: Set up Python 3.10
23-
uses: actions/setup-python@v5
24-
with:
25-
python-version: '3.10'
26-
- name: Install build
27-
run: |
28-
pip install build
29-
- name: Checkout code
30-
uses: actions/checkout@v4
31-
- name: build package
32-
run: python3 -m build .
33-
- name: Login to JFrog Ledger
34-
uses: LedgerHQ/actions-security/actions/jfrog-login@actions/jfrog-login-1
35-
- name: set jfrog Repo URL
36-
run: jf pip-config --repo-resolve=${{ secrets.JFROG_PYPI_REPO_URL }}
37-
- name: upload package
38-
run: jf rt u dist/ --build-name=dts-util-devel --build-number=1 --module=dts-utils
39-
- name: Attest
40-
id: attest
41-
uses: LedgerHQ/actions-security/actions/attest@actions/attest-1
42-
with:
43-
subject-path: 'dist/*'
44-
push-to-registry: true
45-
- name: test install from jfrog
46-
run: |
47-
jf pip install dts-utils
48-
pip show dts-utils
17+
attestations: write
18+
uses: outpost-os/pipeline-python/.github/workflows/publish.yml@main
19+
with:
20+
environment: ledger-publish
21+
runner: outpost-os-shared-small
22+
python-version: '3.10'
23+
build-name: dts-utils-dev
24+
module-name: dts-utils
25+
repo-name: outpost-pypi-dev-green
26+
virtual-repo-name: outpost-pypi-virtual-green
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-FileCopyrightText: 2024 Ledger SAS
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: Upload Python Package to jfrog
6+
7+
on:
8+
release:
9+
types: [released]
10+
11+
jobs:
12+
release:
13+
permissions:
14+
id-token: write
15+
contents: read
16+
attestations: write
17+
uses: outpost-os/pipeline-python/.github/workflows/publish.yml@main
18+
with:
19+
environment: ledger-publish
20+
runner: outpost-os-shared-small
21+
python-version: '3.10'
22+
build-name: dts-utils-dev
23+
module-name: dts-utils
24+
repo-name: outpost-pypi-prod-public
25+
virtual-repo-name: outpost-pypi-virtual-green

0 commit comments

Comments
 (0)