release: prepare plugin manifest from tag#23
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a small “release prep” tool and CI/release workflow gates to ensure plugin.json release metadata (version + download URLs) is derived deterministically from the release tag, preventing stale manifest data from causing late-stage release failures.
Changes:
- Introduces
cmd/release-prep+internal/releaseprepto compute/check/writeplugin.jsonrelease metadata from a semver tag. - Updates CI and release workflows to run the manifest preflight (CI) and rewrite the manifest prior to contract validation/packaging (release).
- Pins GitHub Actions
uses:references to full commit SHAs and adds tests to enforce workflow expectations.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| release_workflow_test.go | Adds assertions for manifest-prep usage in workflows and enforces SHA-pinned uses: lines. |
| internal/releaseprep/manifest.go | Implements manifest read/prepare/check/write logic based on release tag semver. |
| internal/releaseprep/manifest_test.go | Adds unit tests for version/URL updates, stale detection, write behavior, and tag validation. |
| go.mod | Adds golang.org/x/mod for semver validation. |
| cmd/release-prep/main.go | CLI entrypoint wiring flags into releaseprep.Run. |
| .github/workflows/release.yml | Pins actions, adds manifest rewrite step, and runs validation/packaging for tag releases. |
| .github/workflows/ci.yml | Pins actions and adds manifest consistency check prior to tests/vet. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+26
to
+27
| - name: Prepare release manifest | ||
| run: go run ./cmd/release-prep --tag "${{ github.ref_name }}" --write |
This was referenced Jun 6, 2026
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.
Closes #22.
Summary
cmd/release-prepto derive plugin.json version and download URLs from the release tag using Go JSON decoding andgolang.org/x/mod/semverAction pins verified
actions/checkoutv6.0.3 ->df4cb1c069e1874edd31b4311f1884172cec0e10actions/setup-gov6.4.0 ->4a3601121dd01d1626a1e23e37211e3254c1c06cgoreleaser/goreleaser-actionv7.2.2 ->5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89docker/setup-buildx-actionv4.1.0 ->d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5docker/login-actionv4.2.0 ->650006c6eb7dba73a995cc03b0b2d7f5ca915beedocker/build-push-actionv7.2.0 ->f9f3042f7e2789586610d6e8b85c8f03e5195bafVerification
GOWORK=off go test ./... -race -count=1GOWORK=off go run ./cmd/release-prepGOWORK=off go vet ./...actionlint .github/workflows/*.ymlgit diff --checkGOWORK=off go run ./cmd/release-prep --tag v0.1.12rejects checked-in v0.1.11 metadata and all stale download URLs