Skip to content

Commit dcd9912

Browse files
authored
fix(ci): use published install script in release workflows (#416)
1 parent 13f13c2 commit dcd9912

File tree

4 files changed

+72
-37
lines changed

4 files changed

+72
-37
lines changed

.github/workflows/release-auto-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: Release Auto-Tag
66
on:
77
workflow_dispatch: {}
88
schedule:
9-
- cron: "0 3 * * *" # 7 PM PT (03:00 UTC during PDT)
9+
- cron: "0 2 * * *" # 7 PM PDT
1010

1111
permissions:
1212
contents: write

.github/workflows/release-canary.yml

Lines changed: 68 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,53 @@ defaults:
2020
shell: bash
2121

2222
jobs:
23+
# ---------------------------------------------------------------------------
24+
# Verify the default install path (no OPENSHELL_VERSION) resolves to latest
25+
# ---------------------------------------------------------------------------
26+
install-default:
27+
name: Install default (${{ matrix.arch }})
28+
if: >-
29+
github.event.workflow_run.conclusion == 'success'
30+
&& github.event.workflow_run.name == 'Release Tag'
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
include:
35+
- arch: amd64
36+
runner: build-amd64
37+
- arch: arm64
38+
runner: build-arm64
39+
runs-on: ${{ matrix.runner }}
40+
timeout-minutes: 10
41+
container:
42+
image: ghcr.io/nvidia/openshell/ci:latest
43+
credentials:
44+
username: ${{ github.actor }}
45+
password: ${{ secrets.GITHUB_TOKEN }}
46+
steps:
47+
- name: Install CLI (default / latest)
48+
run: |
49+
set -euo pipefail
50+
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | sh
51+
52+
- name: Verify CLI installation
53+
run: |
54+
set -euo pipefail
55+
command -v openshell
56+
ACTUAL="$(openshell --version)"
57+
echo "Installed: $ACTUAL"
58+
# This job only runs after Release Tag, so the triggering tag
59+
# should match the latest release the default installer resolves to.
60+
TAG="${{ github.event.workflow_run.head_branch }}"
61+
if [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
62+
EXPECTED="${TAG#v}"
63+
if [[ "$ACTUAL" != *"$EXPECTED"* ]]; then
64+
echo "::error::Version mismatch: expected '$EXPECTED' in '$ACTUAL'"
65+
exit 1
66+
fi
67+
echo "Version check passed: found $EXPECTED in output"
68+
fi
69+
2370
canary:
2471
name: Canary ${{ matrix.mode }} (${{ matrix.arch }})
2572
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
@@ -82,14 +129,29 @@ jobs:
82129
fi
83130
fi
84131
85-
- name: Install CLI from GitHub Release
86-
run: ./install.sh
87-
env:
88-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89-
OPENSHELL_VERSION: ${{ steps.release.outputs.tag }}
132+
- name: Install CLI from published install script
133+
run: |
134+
set -euo pipefail
135+
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | OPENSHELL_VERSION=${{ steps.release.outputs.tag }} OPENSHELL_INSTALL_DIR=/usr/local/bin sh
90136
91137
- name: Verify CLI installation
92-
run: openshell --version
138+
run: |
139+
set -euo pipefail
140+
command -v openshell
141+
ACTUAL="$(openshell --version)"
142+
echo "Installed: $ACTUAL"
143+
TAG="${{ steps.release.outputs.tag }}"
144+
# For tagged releases (v1.2.3), verify the semver appears in the version string
145+
if [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
146+
EXPECTED="${TAG#v}"
147+
if [[ "$ACTUAL" != *"$EXPECTED"* ]]; then
148+
echo "::error::Version mismatch: expected '$EXPECTED' in '$ACTUAL'"
149+
exit 1
150+
fi
151+
echo "Version check passed: found $EXPECTED in output"
152+
else
153+
echo "Non-release tag ($TAG), skipping version check"
154+
fi
93155
94156
- name: Resolve gateway host
95157
run: |

.github/workflows/release-tag.yml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -364,37 +364,10 @@ jobs:
364364
365365
### Quick install
366366
367-
Requires the [GitHub CLI (`gh`)](https://cli.github.com) to be installed and authenticated.
368-
369-
```bash
370-
sh -c 'ARCH=$(uname -m); OS=$(uname -s); \
371-
case "${OS}-${ARCH}" in \
372-
Linux-x86_64) ASSET="openshell-x86_64-unknown-linux-musl.tar.gz" ;; \
373-
Linux-aarch64) ASSET="openshell-aarch64-unknown-linux-musl.tar.gz" ;; \
374-
Darwin-arm64) ASSET="openshell-aarch64-apple-darwin.tar.gz" ;; \
375-
*) echo "Unsupported platform: ${OS}-${ARCH}" >&2; exit 1 ;; \
376-
esac; \
377-
gh release download ${{ env.RELEASE_TAG }} --repo NVIDIA/OpenShell --pattern "${ASSET}" -O - \
378-
| tar xz \
379-
&& sudo install -m 755 openshell /usr/local/bin/openshell'
380-
```
381-
382-
### Docker images
383-
384367
```bash
385-
docker pull ghcr.io/nvidia/openshell/gateway:${{ needs.compute-versions.outputs.semver }}
386-
docker pull ghcr.io/nvidia/openshell/cluster:${{ needs.compute-versions.outputs.semver }}
368+
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | OPENSHELL_VERSION=${{ env.RELEASE_TAG }} sh
387369
```
388370
389-
### Assets
390-
391-
| File | Platform |
392-
|------|----------|
393-
| `openshell-x86_64-unknown-linux-musl.tar.gz` | Linux x86_64 |
394-
| `openshell-aarch64-unknown-linux-musl.tar.gz` | Linux aarch64 / ARM64 |
395-
| `openshell-aarch64-apple-darwin.tar.gz` | macOS Apple Silicon |
396-
| `openshell-*.whl` | Python wheels |
397-
| `openshell-checksums-sha256.txt` | SHA256 checksums for all archives |
398371
files: |
399372
release/openshell-x86_64-unknown-linux-musl.tar.gz
400373
release/openshell-aarch64-unknown-linux-musl.tar.gz

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ EXAMPLES:
6161
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | sh
6262
6363
# Install a specific version
64-
OPENSHELL_VERSION=v0.0.4 curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | sh
64+
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | OPENSHELL_VERSION=v0.0.9 sh
6565
6666
# Install to /usr/local/bin
67-
OPENSHELL_INSTALL_DIR=/usr/local/bin curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | sh
67+
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | OPENSHELL_INSTALL_DIR=/usr/local/bin sh
6868
EOF
6969
}
7070

0 commit comments

Comments
 (0)