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
The last two releases (10.1.0 and 10.1.1) failed to publish signed NuGet packages because the sign and release jobs in build-library.yml and build-template.yml were silently skipped — not failed — on the release: published trigger.
On run 28783150142 (the 10.1.1 release), $GITHUB_REF was empty in the build job (verified byte-for-byte in the raw log), even though GitHub's docs state GITHUB_REF for a release event should be refs/tags/<tag_name>.
This isn't a one-off: the 10.1.0 release (27936434216) hit the identical bug on build-template.yml. Releases before that (10.0.1 and earlier) worked correctly — github.ref genuinely resolved to the tag. The regression's timing lines up with GitHub's June 18, 2026 "Control who and what triggers GitHub Actions workflows" change, though this couldn't be fully confirmed without org-admin access to check for enterprise/org rulesets. Notably, every release in this repo tags the exact tip of main, which may be a contributing factor to whatever ambiguity is being hit.
Impact
10.1.0: library packages were manually recovered via workflow_dispatch (ref=10.1.0), but CommunityToolkit.Datasync.Server.Template.CSharp never published — nuget.org is still stuck at 10.0.1 for the template package.
10.1.1: both library and template packages were skipped; being manually recovered via workflow_dispatch on ref=10.1.1 (see recent runs).
(Leave workflow_dispatch working as-is for manual recovery.)
Stop relying on $env:GITHUB_REF in tools/GetBuildVersion.psm1 for release events. Pass github.event.release.tag_name explicitly (e.g., build VersionString as refs/tags/${{ github.event.release.tag_name }} when github.event_name == 'release', else fall back to $env:GITHUB_REF), so a blank ref can't silently produce a wrong package version even if the gating logic is fixed.
Fail loudly instead of skipping silently. Add a guard step in release (gated on github.event_name == 'release') that asserts github.ref_name == github.event.release.tag_name and emits ::error:: + exits non-zero if not — turning this into a visible red ❌ instead of a quiet "skipped" that went unnoticed for a week last time.
Optional: a scheduled workflow that compares the latest git tag to the latest published NuGet.org version and opens an issue on drift, to catch this class of failure automatically.
Optional: file a GitHub Support ticket / community discussion referencing runs 28783150142 and 27936434216 as evidence, since an empty GITHUB_REF for release events contradicts documented platform behavior.
Known gap (accepted)
CommunityToolkit.Datasync.Server.Template.CSharp@10.1.0 will remain unpublished on nuget.org. Backfilling it isn't a simple re-dispatch, since workflow_dispatch on ref=10.1.0 would run the pre-OIDC workflow (same expired-token 403). Decided to leave this gap rather than rotate the old token for a superseded version.
Summary
The last two releases (
10.1.0and10.1.1) failed to publish signed NuGet packages because thesignandreleasejobs inbuild-library.ymlandbuild-template.ymlwere silently skipped — not failed — on therelease: publishedtrigger.Root cause
Both jobs gate on
github.ref:On run 28783150142 (the
10.1.1release),$GITHUB_REFwas empty in thebuildjob (verified byte-for-byte in the raw log), even though GitHub's docs stateGITHUB_REFfor areleaseevent should berefs/tags/<tag_name>.This isn't a one-off: the
10.1.0release (27936434216) hit the identical bug onbuild-template.yml. Releases before that (10.0.1and earlier) worked correctly —github.refgenuinely resolved to the tag. The regression's timing lines up with GitHub's June 18, 2026 "Control who and what triggers GitHub Actions workflows" change, though this couldn't be fully confirmed without org-admin access to check for enterprise/org rulesets. Notably, every release in this repo tags the exact tip ofmain, which may be a contributing factor to whatever ambiguity is being hit.Impact
10.1.0: library packages were manually recovered viaworkflow_dispatch(ref=10.1.0), butCommunityToolkit.Datasync.Server.Template.CSharpnever published — nuget.org is still stuck at10.0.1for the template package.10.1.1: both library and template packages were skipped; being manually recovered viaworkflow_dispatchonref=10.1.1(see recent runs).10.1.0's template package also surfaced a second, unrelated issue: the oldNUGET_PACKAGE_PUSH_TOKEN-based push started failing with a 403 (expired/invalid key), which is what motivated the move to NuGet Trusted Publishing in build: enable NuGet trusted publishing for release workflows #494/Enable Trusted Publishing #486.Recommended fix
In both
build-library.ymlandbuild-template.yml:sign/releaseongithub.refstring matching. Use the triggering event instead, which doesn't depend on ref resolution:workflow_dispatchworking as-is for manual recovery.)$env:GITHUB_REFintools/GetBuildVersion.psm1forreleaseevents. Passgithub.event.release.tag_nameexplicitly (e.g., buildVersionStringasrefs/tags/${{ github.event.release.tag_name }}whengithub.event_name == 'release', else fall back to$env:GITHUB_REF), so a blank ref can't silently produce a wrong package version even if the gating logic is fixed.release(gated ongithub.event_name == 'release') that assertsgithub.ref_name == github.event.release.tag_nameand emits::error::+ exits non-zero if not — turning this into a visible red ❌ instead of a quiet "skipped" that went unnoticed for a week last time.28783150142and27936434216as evidence, since an emptyGITHUB_REFforreleaseevents contradicts documented platform behavior.Known gap (accepted)
CommunityToolkit.Datasync.Server.Template.CSharp@10.1.0will remain unpublished on nuget.org. Backfilling it isn't a simple re-dispatch, sinceworkflow_dispatchonref=10.1.0would run the pre-OIDC workflow (same expired-token 403). Decided to leave this gap rather than rotate the old token for a superseded version.