Skip to content

Commit 249ca10

Browse files
authored
chore(ci): upload Python wheels to release assets (#300)
1 parent 2836210 commit 249ca10

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

.github/workflows/release-dev.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@ jobs:
140140
aws s3 ls "s3://${NAV_PYPI_S3_BUCKET}/${S3_PREFIX}/"
141141
echo "s3_prefix=${S3_PREFIX}" >> "$GITHUB_OUTPUT"
142142
143+
- name: Upload wheel artifacts
144+
uses: actions/upload-artifact@v4
145+
with:
146+
name: python-wheels
147+
path: target/wheels/*.whl
148+
retention-days: 5
149+
143150
publish-python:
144151
name: Publish Python
145152
needs: [build-python-wheels]
@@ -371,11 +378,11 @@ jobs:
371378
retention-days: 5
372379

373380
# ---------------------------------------------------------------------------
374-
# Create / update the devel GitHub Release with CLI binaries
381+
# Create / update the devel GitHub Release with CLI binaries and wheels
375382
# ---------------------------------------------------------------------------
376383
release-devel:
377384
name: Release Devel
378-
needs: [build-cli-linux, build-cli-macos]
385+
needs: [build-cli-linux, build-cli-macos, build-python-wheels]
379386
runs-on: build-amd64
380387
timeout-minutes: 10
381388
steps:
@@ -388,11 +395,17 @@ jobs:
388395
path: release/
389396
merge-multiple: true
390397

398+
- name: Download wheel artifacts
399+
uses: actions/download-artifact@v4
400+
with:
401+
name: python-wheels
402+
path: release/
403+
391404
- name: Generate checksums
392405
run: |
393406
set -euo pipefail
394407
cd release
395-
sha256sum *.tar.gz > openshell-checksums-sha256.txt
408+
sha256sum *.tar.gz *.whl > openshell-checksums-sha256.txt
396409
cat openshell-checksums-sha256.txt
397410
398411
- name: Move devel tag
@@ -438,9 +451,11 @@ jobs:
438451
| `openshell-x86_64-unknown-linux-musl.tar.gz` | Linux x86_64 | `gh release download devel --repo NVIDIA/OpenShell --pattern "openshell-x86_64-unknown-linux-musl.tar.gz" -O - \| tar xz && sudo install -m 755 openshell /usr/local/bin/openshell` |
439452
| `openshell-aarch64-unknown-linux-musl.tar.gz` | Linux aarch64 / ARM64 | `gh release download devel --repo NVIDIA/OpenShell --pattern "openshell-aarch64-unknown-linux-musl.tar.gz" -O - \| tar xz && sudo install -m 755 openshell /usr/local/bin/openshell` |
440453
| `openshell-aarch64-apple-darwin.tar.gz` | macOS Apple Silicon | `gh release download devel --repo NVIDIA/OpenShell --pattern "openshell-aarch64-apple-darwin.tar.gz" -O - \| tar xz && sudo install -m 755 openshell /usr/local/bin/openshell` |
454+
| `openshell-*.whl` | Python wheels | `gh release download devel --repo NVIDIA/OpenShell --pattern "openshell-*.whl"` |
441455
| `openshell-checksums-sha256.txt` | — | SHA256 checksums for all archives |
442456
files: |
443457
release/openshell-x86_64-unknown-linux-musl.tar.gz
444458
release/openshell-aarch64-unknown-linux-musl.tar.gz
445459
release/openshell-aarch64-apple-darwin.tar.gz
460+
release/*.whl
446461
release/openshell-checksums-sha256.txt

.github/workflows/release-tag.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@ jobs:
162162
aws s3 ls "s3://${NAV_PYPI_S3_BUCKET}/${S3_PREFIX}/"
163163
echo "s3_prefix=${S3_PREFIX}" >> "$GITHUB_OUTPUT"
164164
165+
- name: Upload wheel artifacts
166+
uses: actions/upload-artifact@v4
167+
with:
168+
name: python-wheels
169+
path: target/wheels/*.whl
170+
retention-days: 5
171+
165172
publish-python:
166173
name: Publish Python
167174
needs: [build-python-wheels]
@@ -393,11 +400,11 @@ jobs:
393400
retention-days: 5
394401

395402
# ---------------------------------------------------------------------------
396-
# Create a tagged GitHub Release with CLI binaries
403+
# Create a tagged GitHub Release with CLI binaries and wheels
397404
# ---------------------------------------------------------------------------
398405
release:
399406
name: Release
400-
needs: [compute-versions, build-cli-linux, build-cli-macos, publish-python, tag-ghcr-release]
407+
needs: [compute-versions, build-cli-linux, build-cli-macos, build-python-wheels, publish-python, tag-ghcr-release]
401408
runs-on: build-amd64
402409
timeout-minutes: 10
403410
steps:
@@ -410,11 +417,17 @@ jobs:
410417
path: release/
411418
merge-multiple: true
412419

420+
- name: Download wheel artifacts
421+
uses: actions/download-artifact@v4
422+
with:
423+
name: python-wheels
424+
path: release/
425+
413426
- name: Generate checksums
414427
run: |
415428
set -euo pipefail
416429
cd release
417-
sha256sum *.tar.gz > openshell-checksums-sha256.txt
430+
sha256sum *.tar.gz *.whl > openshell-checksums-sha256.txt
418431
cat openshell-checksums-sha256.txt
419432
420433
- name: Create GitHub Release
@@ -460,9 +473,11 @@ jobs:
460473
| `openshell-x86_64-unknown-linux-musl.tar.gz` | Linux x86_64 |
461474
| `openshell-aarch64-unknown-linux-musl.tar.gz` | Linux aarch64 / ARM64 |
462475
| `openshell-aarch64-apple-darwin.tar.gz` | macOS Apple Silicon |
476+
| `openshell-*.whl` | Python wheels |
463477
| `openshell-checksums-sha256.txt` | SHA256 checksums for all archives |
464478
files: |
465479
release/openshell-x86_64-unknown-linux-musl.tar.gz
466480
release/openshell-aarch64-unknown-linux-musl.tar.gz
467481
release/openshell-aarch64-apple-darwin.tar.gz
482+
release/*.whl
468483
release/openshell-checksums-sha256.txt

0 commit comments

Comments
 (0)