Skip to content

release: prepare plugin manifest from tag#23

Merged
intel352 merged 1 commit into
mainfrom
chore/issue-22-release-metadata
Jun 6, 2026
Merged

release: prepare plugin manifest from tag#23
intel352 merged 1 commit into
mainfrom
chore/issue-22-release-metadata

Conversation

@intel352
Copy link
Copy Markdown
Contributor

@intel352 intel352 commented Jun 6, 2026

Closes #22.

Summary

  • add cmd/release-prep to derive plugin.json version and download URLs from the release tag using Go JSON decoding and golang.org/x/mod/semver
  • run the manifest preflight in CI and rewrite the release workspace manifest before contract validation and GoReleaser packaging
  • pin GitHub Actions in CI/release workflows to commit SHAs with version comments
  • add tests for stale metadata detection, manifest writing, release workflow coverage, and SHA-pinned action refs

Action pins verified

  • actions/checkout v6.0.3 -> df4cb1c069e1874edd31b4311f1884172cec0e10
  • actions/setup-go v6.4.0 -> 4a3601121dd01d1626a1e23e37211e3254c1c06c
  • goreleaser/goreleaser-action v7.2.2 -> 5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89
  • docker/setup-buildx-action v4.1.0 -> d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5
  • docker/login-action v4.2.0 -> 650006c6eb7dba73a995cc03b0b2d7f5ca915bee
  • docker/build-push-action v7.2.0 -> f9f3042f7e2789586610d6e8b85c8f03e5195baf

Verification

  • GOWORK=off go test ./... -race -count=1
  • GOWORK=off go run ./cmd/release-prep
  • GOWORK=off go vet ./...
  • actionlint .github/workflows/*.yml
  • git diff --check
  • expected failure proof: GOWORK=off go run ./cmd/release-prep --tag v0.1.12 rejects checked-in v0.1.11 metadata and all stale download URLs

Copilot AI review requested due to automatic review settings June 6, 2026 18:39
@intel352 intel352 merged commit f3f3951 into main Jun 6, 2026
5 checks passed
@intel352 intel352 deleted the chore/issue-22-release-metadata branch June 6, 2026 18:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/releaseprep to compute/check/write plugin.json release 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automate plugin.json release metadata updates

2 participants