feat: auto-cut patch releases when a CLI version is added - #184
Open
TerryHowe wants to merge 1 commit into
Open
Conversation
Add an auto-release workflow that cuts a patch release whenever a new ORAS CLI version lands in src/lib/data/releases.json on main, and a RELEASING.md documenting the release process. The workflow diffs releases.json against the parent commit and only releases when a new version key was added (dep bumps and formatting are ignored), patch-bumps the latest vX.Y.Z tag, creates the release, and moves the floating vX / vX.Y tags in-job. The tag move is done in-job because a release created with the default GITHUB_TOKEN does not emit a release:published event, so update-version.yml would never fire. Minor and major releases remain manual. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Terry Howe <terrylhowe@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a workflow that automatically cuts a patch release when a new ORAS
CLI version lands in
src/lib/data/releases.jsononmain, plus aRELEASING.mddocumenting the release process.Follows on from the manual
v2.0.1release, which shipped ORAS CLI 1.3.2 and1.3.3 support. That release was cut entirely by hand; this automates the common
case so a new CLI version releases itself.
How it works
.github/workflows/auto-release.ymltriggers onpushtomainfiltered tosrc/lib/data/releases.json(e.g. after theUpdate releases.jsonPR merges):releases.jsonagainstHEAD^and extracts newly addedversion keys. If none were added (dependency bumps, formatting, checksum
edits), the job ends without releasing.
vX.Y.Ztag and patch-bumps it(
v2.0.1→v2.0.2). Idempotent: skips if the target tag already exists.gh release createoff the pushed commit with a Highlightsbody naming the added CLI version(s).
vXandvX.Yto the release commit,in the same job.
Why the tag move is in-job
A release created with the default
GITHUB_TOKENdoes not emit arelease: publishedevent (GitHub suppresses it to prevent workflowrecursion), so the existing
update-version.ymlwould never fire. Doing themajor/minor tag move directly in this job avoids needing a PAT. The workflow
only pushes tag refs, so it cannot self-trigger.
Scope / guardrails
Node runtime migration in v2.0.0) stay manual — see
RELEASING.md.concurrency: auto-releaseserializes releases.workflow_dispatchis included for manual testing.contents: write.Note for reviewers
The
github-actionsbot must be permitted to force-pushvX/vX.Yunderany tag protection ruleset.
update-version.ymlalready does this today, sothe same permissions apply.
🤖 Generated with Claude Code