@@ -20,6 +20,53 @@ defaults:
2020 shell : bash
2121
2222jobs :
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 : |
0 commit comments