Skip to content

fix(ci): source release tag from github.ref_name on all self-hosted runners - #221

Merged
thcp merged 2 commits into
mainfrom
fix/windows-release-ref-name
Jun 24, 2026
Merged

fix(ci): source release tag from github.ref_name on all self-hosted runners#221
thcp merged 2 commits into
mainfrom
fix/windows-release-ref-name

Conversation

@thcp

@thcp thcp commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Problem

Every release job for v0.7.0-alpha.17 failed (or would fail) at write version files:

GITHUB_REF_NAME is not set        # Windows
Could not determine a version     # Linux (same cause)

Both the win and wsl2 self-hosted runners leave $GITHUB_REF_NAME empty.

Cause

GITHUB_REF_NAME is injected by the runner, and only exists on Actions runner >= 2.290. Your self-hosted runners — recently re-registered at org level — are older, so the variable is empty. The previous runners that built alpha.16 had it.

Fix

Read the tag from the ${{ github.ref_name }} context (evaluated by Actions before the step runs), via a REF_NAME env var, instead of the runner-injected $GITHUB_REF_NAME. Independent of runner version.

Applied to all three release workflows for consistency, since all three run on the same class of self-hosted runner:

  • windows-release.yml — job-level REF_NAME; version step + both build steps.
  • linux-release.yml — version step (release branch).
  • macos-release.yml — version step.

Notes

  • Root-cause hygiene (separate from this PR): update the self-hosted runners to the latest Actions runner version; GitHub auto-update may be disabled on them.
  • This won't retroactively fix the already-published alpha.17 — re-firing release: published (or cutting alpha.18) after merge is needed to rebuild assets with the fixed workflows.

🤖 Generated with Claude Code

Thales added 2 commits June 24, 2026 18:50
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).
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.
@thcp thcp changed the title fix(ci): source release tag from github.ref_name on Windows fix(ci): source release tag from github.ref_name on all self-hosted runners Jun 24, 2026
@thcp
thcp merged commit 44336a5 into main Jun 24, 2026
8 checks passed
@thcp
thcp deleted the fix/windows-release-ref-name branch June 24, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant