From ea78a25a9ec7cbc04185a23d42aa594210ec3344 Mon Sep 17 00:00:00 2001 From: Thales <> Date: Wed, 24 Jun 2026 18:50:49 +0100 Subject: [PATCH 1/2] fix(ci): source release tag from github.ref_name on Windows The Windows release job failed at 'write version files' with 'GITHUB_REF_NAME is not set' on the org-level self-hosted win runner, while the Linux runner saw the variable fine. $env:GITHUB_REF_NAME is only injected by Actions runner >= 2.290, so an older self-hosted runner leaves it empty. Source the tag from the github.ref_name context (evaluated by Actions before the step runs) via a job-level REF_NAME env var instead, so the build no longer depends on the runner version. Replaces all three $env:GITHUB_REF_NAME usages (version step + both build steps). --- .github/workflows/windows-release.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index 21ce07af..a29536c5 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -17,6 +17,11 @@ jobs: timeout-minutes: 90 permissions: contents: write + # Source the tag from the github context (evaluated by Actions) rather than + # $env:GITHUB_REF_NAME, which is only injected by runner >= 2.290. Keeps the + # build working on older self-hosted runners. (#212 follow-up) + env: + REF_NAME: ${{ github.ref_name }} defaults: run: shell: powershell @@ -29,8 +34,8 @@ jobs: - name: write version files run: | - $tag = $env:GITHUB_REF_NAME - if (-not $tag) { throw "GITHUB_REF_NAME is not set" } + $tag = $env:REF_NAME + if (-not $tag) { throw "REF_NAME is not set" } $version = $tag -replace '^v', '' $json = "{`"version`": `"$version`"}" Set-Content -Path "static/version.json" -Value $json -Encoding UTF8 @@ -48,14 +53,14 @@ jobs: run: | powershell -NoProfile -ExecutionPolicy Bypass -File scripts/windows/make-portable.ps1 ` -PackageName StemDeck-Windows-x64.NVIDIA ` - -PackageVersion "$env:GITHUB_REF_NAME" ` + -PackageVersion "$env:REF_NAME" ` -StripVenv - name: build Windows CPU run: | powershell -NoProfile -ExecutionPolicy Bypass -File scripts/windows/make-portable.ps1 ` -PackageName StemDeck-Windows-x64 ` - -PackageVersion "$env:GITHUB_REF_NAME" ` + -PackageVersion "$env:REF_NAME" ` -CpuOnly ` -StripVenv From b7163499706b9ad0790641ff1ad57342eb37d1bb Mon Sep 17 00:00:00 2001 From: Thales <> Date: Wed, 24 Jun 2026 18:52:52 +0100 Subject: [PATCH 2/2] fix(ci): source release tag from github.ref_name on Linux and macOS too The Linux release job failed at 'write version files' with the same empty-GITHUB_REF_NAME cause as Windows: the wsl2 self-hosted runner is also older than 2.290. macOS uses the same pattern and the same class of runner, so fix all three release workflows consistently to read github.ref_name from context via a REF_NAME env var. --- .github/workflows/linux-release.yml | 6 +++++- .github/workflows/macos-release.yml | 11 ++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux-release.yml b/.github/workflows/linux-release.yml index 9b045ecc..7f10182e 100644 --- a/.github/workflows/linux-release.yml +++ b/.github/workflows/linux-release.yml @@ -56,11 +56,15 @@ jobs: - name: write version files env: DISPATCH_VERSION: ${{ inputs.version }} + # github.ref_name (evaluated by Actions) instead of $GITHUB_REF_NAME, + # which is only injected by runner >= 2.290 — empty on older + # self-hosted runners. + REF_NAME: ${{ github.ref_name }} run: | if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then VERSION="${DISPATCH_VERSION#v}" else - VERSION="${GITHUB_REF_NAME#v}" + VERSION="${REF_NAME#v}" fi if [ -z "$VERSION" ]; then echo "Could not determine a version" >&2 diff --git a/.github/workflows/macos-release.yml b/.github/workflows/macos-release.yml index ba7e4578..54fb155e 100644 --- a/.github/workflows/macos-release.yml +++ b/.github/workflows/macos-release.yml @@ -27,12 +27,17 @@ jobs: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - name: write version files + env: + # github.ref_name (evaluated by Actions) instead of $GITHUB_REF_NAME, + # which is only injected by runner >= 2.290 — empty on older + # self-hosted runners. + REF_NAME: ${{ github.ref_name }} run: | - if [ -z "${GITHUB_REF_NAME:-}" ]; then - echo "GITHUB_REF_NAME is not set" >&2 + if [ -z "${REF_NAME:-}" ]; then + echo "REF_NAME is not set" >&2 exit 1 fi - VERSION="${GITHUB_REF_NAME#v}" + VERSION="${REF_NAME#v}" printf '{ "version": "%s" }\n' "$VERSION" > static/version.json sed -i '' "s/^version = \".*\"/version = \"$VERSION\"/" desktop/src-tauri/Cargo.toml sed -i '' "s/\"version\": \"[^\"]*\"/\"version\": \"$VERSION\"/" desktop/src-tauri/tauri.conf.json