Repository navigation
Description
Problem
The v1.3.6 snap release failed on all architectures (amd64, arm64, s390x) at the publish step: https://github.com/oras-project/oras/actions/runs/40123903603
Store operation failed:
- invalid-channel-permission: Macaroon channel restrictions (stable) do not allow release to candidate.
The Snap Store still serves v1.3.5 on stable.
Cause
#2274 changed .github/workflows/release-snap.yml so that stable releases go to stable,candidate instead of stable. The SNAPCRAFT_STORE_CREDENTIALS token can only release to stable, so the store rejects the upload. v1.3.5 used SNAP_RELEASE: stable and succeeded.
Fix
Revert the one-line change in release-snap.yml:
- echo "release=stable,candidate" >> $GITHUB_OUTPUT
+ echo "release=stable" >> $GITHUB_OUTPUTReleasing to candidate isn't needed. The candidate, beta and edge channels have been closed, so they follow stable and stay current automatically (see #2272).
After it merges, rerun the release-snap workflow for v1.3.6 with isStable: true.
Evaluation
Feasibility
- Only
.github/workflows/release-snap.ymlneeds to change. No Go code orsnapcraft.yamlchanges. - The
SNAPCRAFT_STORE_CREDENTIALStoken can only release tostable, and only a snap store collaborator can regenerate it. - Pre-releases are affected too.
release-snap.yml#L47sends pre-releases (isStable: false) tocandidate, which this token can't release to either. The next RC snap will fail the same way. None of the recent snap runs was a pre-release, so this hasn't shown up yet. Reverting line 45 fixes stable releases; RCs are handled by no longer publishing them (step 2).
Effort
Small: a few lines in one file (revert line 45, skip publishing for pre-releases), then rerun the v1.3.6 release.
Risk
- Behavior: this restores how v1.3.5 and earlier were released.
candidate,betaandedgeare closed and followstable, so users on those channels still get v1.3.6. - Security: the token stays limited to
stable, which matches Snap packaging and release follow-ups #2272. - Pre-releases: RCs will no longer be published to the snap store. They are still published on GitHub Releases.
- Tests: there are no snap tests. The only real check is running the workflow.
- Leftovers from the failed run: the store may have kept unreleased revisions, which do no harm. A rerun builds and uploads new ones.
Suggested approach
- Change
release-snap.yml#L45fromrelease=stable,candidatetorelease=stable. - Stop publishing to the snap store when
isStableis false: skip thepublishstep for pre-releases (for exampleif: ${{ inputs.isStable }}on that step) and remove therelease=candidatebranch at line 47. The token stays limited tostable, and RC runs no longer fail at publish. - Merge, then run
gh workflow run release-snap.yml -R oras-project/oras -f version=v1.3.6 -f isStable=true. - Check the store shows v1.3.6 on
stablefor amd64, arm64 and s390x.
Related code
release-snap.yml#L44-L48: picks the channel. Line 45 broke stable releases; line 47 is the pre-release path to remove.release-snap.yml#L80-L86: the publish step that passes$SNAP_RELEASEtosnapcraft upload --release.- build: keep snap candidate channel current #2274 added
candidateto stable releases. oras contains outdated Ubuntu packages #2270 and Snap packaging and release follow-ups #2272 give the background on closing the channels and narrowing the token.
Activity
TerryHowe commentedon Oct 24, 2026
With #2295 merged, I reran
release-snapfrommainfor v1.3.6 withisStable: true: https://github.com/oras-project/oras/actions/runs/40130072247It passed on amd64, arm64 and s390x, and v1.3.6 is now on the
stablechannel for all three: https://snapcraft.io/oras