You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #495 (recommendation #3 in that issue), deferred from the fix PR.
#495's recommended fix included a guard step in the release job that asserts github.ref_name == github.event.release.tag_name and fails loudly (::error:: + non-zero exit) if they don't match, rather than silently skipping.
Why this was deferred
The fix landed in #495 addresses the actual root causes without depending on github.ref/github.ref_name at all:
sign/release job if: conditions are now gated on github.event_name instead of string-matching github.ref.
The package version is now computed from github.event.release.tag_name directly for release events instead of $env:GITHUB_REF.
However, the observed bug in #495 was that github.ref/$env:GITHUB_REF was empty on release: published events for this repo (confirmed byte-for-byte in run logs for both the 10.1.0 and 10.1.1 releases). If that emptiness is a persistent platform/org-policy behavior rather than a one-off glitch, then a guard that hard-fails whenever github.ref_name != github.event.release.tag_name would fail on every future release — even though the real skip/version bugs are already fixed — because an empty ref_name will never equal a real tag name. That would turn a now-working pipeline back into a permanently red one.
What to do
Once it's confirmed (e.g. after a test release such as 10.1.2) whether github.ref/github.ref_name reliably resolves on release events again:
- name: Verify release ref matches published tagif: ${{ github.event_name == 'release' }}run: | if [ "${{ github.ref_name }}" != "${{ github.event.release.tag_name }}" ]; then echo "::error::github.ref_name ('${{ github.ref_name }}') does not match github.event.release.tag_name ('${{ github.event.release.tag_name }}')" exit 1 fishell: bash
in the release job of both build-library.yml and build-template.yml, before the existing steps.
If it's still empty/unreliable: reconsider the guard's design (e.g. only warn, or compare against something else that doesn't depend on ref resolution) rather than hard-failing on every release.
Background
Follow-up to #495 (recommendation #3 in that issue), deferred from the fix PR.
#495's recommended fix included a guard step in the
releasejob that assertsgithub.ref_name == github.event.release.tag_nameand fails loudly (::error::+ non-zero exit) if they don't match, rather than silently skipping.Why this was deferred
The fix landed in #495 addresses the actual root causes without depending on
github.ref/github.ref_nameat all:sign/releasejobif:conditions are now gated ongithub.event_nameinstead of string-matchinggithub.ref.github.event.release.tag_namedirectly forreleaseevents instead of$env:GITHUB_REF.However, the observed bug in #495 was that
github.ref/$env:GITHUB_REFwas empty onrelease: publishedevents for this repo (confirmed byte-for-byte in run logs for both the10.1.0and10.1.1releases). If that emptiness is a persistent platform/org-policy behavior rather than a one-off glitch, then a guard that hard-fails whenevergithub.ref_name != github.event.release.tag_namewould fail on every future release — even though the real skip/version bugs are already fixed — because an emptyref_namewill never equal a real tag name. That would turn a now-working pipeline back into a permanently red one.What to do
Once it's confirmed (e.g. after a test release such as
10.1.2) whethergithub.ref/github.ref_namereliably resolves onreleaseevents again:releasejob of bothbuild-library.ymlandbuild-template.yml, before the existing steps.References
$GITHUB_REFconfirmed in logs)