Add auto-tag workflow on plugin.json bump (closes the v1.12 -> v1.20.0 drift failure mode)#76
Merged
Merged
Conversation
Closes the failure mode the repo hit between v1.12 and v1.20.0: plugin.json version was bumped through several PRs (1.13, 1.14, ..., 1.19) without anyone manually tagging, so release.yml never fired and the latest GitHub release zip drifted weeks behind main. Codex flagged this as P1 in its follow-up audit (#75) and the manual fix was to push v1.20.0 by hand. The new workflow .github/workflows/auto-tag-on-plugin-bump.yml runs on every push to main where .claude-plugin/plugin.json changed: 1. Reads the version field via jq, validates it as semver-like (X.Y.Z). 2. Checks whether refs/tags/v<version> already exists - skips if so (handles the case where someone manually pre-tagged). 3. Otherwise creates an annotated tag pointing at the merge commit and pushes it. release.yml then auto-fires from the new tag and publishes cloud-finops-v<version>.zip. Permissions: contents: write (needed to push the tag). The default GITHUB_TOKEN is sufficient. Operational note: the tag is created by github-actions[bot] so the commit history shows the bot as the tagger. The release body is still auto- populated by release.yml's generate_release_notes flag, so the human- visible release page gets the usual PR / commit summary. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
Summary
Adds
.github/workflows/auto-tag-on-plugin-bump.yml. On every push tomainthat touches.claude-plugin/plugin.json, the workflow:jq, validates asX.Y.Z.refs/tags/v<version>already exists - skips if so.release.ymlthen auto-fires from the new tag and publishescloud-finops-v<version>.zip.This closes the drift failure mode the repo hit between v1.12 (April) and v1.20.0 (today): plugin.json was bumped through several PRs without anyone manually tagging, so
release.ymlnever fired and the README's "download the latest release" link kept resolving to a stale zip. The Codex audit (#75) caught it as P1.Test plan
.claude-plugin/plugin.jsonactually changes - no accidental re-tag on README-only commits.contents: writeonly, no extra secrets.1.20.1in a small follow-up PR; the workflow should auto-createv1.20.1.🤖 Generated with Claude Code