Skip to content

Commit 62c7329

Browse files
CI: Upload SDK on PyPi
1 parent 4d93d15 commit 62c7329

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

.github/workflows/cd.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ jobs:
9494
generate_release_notes: true
9595
# Attach all the downloaded wheels to the GitHub Release page
9696
files: ./wheelhouse/*.whl
97-
9897

9998
upload-pypi:
10099
name: Push SlicerCore on PyPi
@@ -126,3 +125,34 @@ jobs:
126125
uses: pypa/gh-action-pypi-publish@release/v1
127126
with:
128127
packages-dir: ./wheelhouse
128+
129+
upload-pypi-sdk:
130+
name: Push SlicerCoreSDK on PyPi
131+
needs: [release-first, release-all]
132+
runs-on: ubuntu-latest
133+
environment:
134+
name: pypi
135+
url: https://pypi.org/p/slicer-core-sdk
136+
permissions:
137+
id-token: write # IMPORTANT: mandatory for trusted publishing
138+
contents: write # IMPORTANT: mandatory for making GitHub Releases
139+
140+
steps:
141+
- name: Checkout
142+
uses: actions/checkout@v4
143+
144+
- name: Download all wheel artifacts
145+
uses: actions/download-artifact@v4
146+
with:
147+
path: ./wheelhouse
148+
pattern: slicer_core_sdk-*
149+
merge-multiple: true # Flattens them into one directory
150+
151+
- name: Show downloaded wheels
152+
run: ls ./wheelhouse
153+
154+
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
155+
- name: Publish package distributions to PyPI
156+
uses: pypa/gh-action-pypi-publish@release/v1
157+
with:
158+
packages-dir: ./wheelhouse

0 commit comments

Comments
 (0)