Skip to content

ci: migrate releases to release-please#571

Merged
tolzhabayev merged 1 commit intomainfrom
feat/release-please
May 8, 2026
Merged

ci: migrate releases to release-please#571
tolzhabayev merged 1 commit intomainfrom
feat/release-please

Conversation

@tolzhabayev
Copy link
Copy Markdown
Contributor

Summary

Replaces the do-release.yml / do-release-mcp.yml workflow_dispatch flow with release-please, aligning with the convention used in grafana/plugin-ci-workflows and grafana/plugin-actions. The previous flow is blocked by the org-level "Public repo required PRs" ruleset (see failed run https://github.com/grafana/plugin-validator/actions/runs/25546676728), and bypassing it isn't an option (org-scoped, requires org owner, would weaken the policy across all public Grafana repos).

Supersedes #570 — that PR's bridge fix is replaced by this convention-aligned approach.

What changes

  • release-please-config.json + .release-please-manifest.json: two packages, . (plugin-validator) and mcp-package (mcp), release-type: "node", tag-separator: "/", conventional-commits changelog sections matching the reference repos. Root pins bootstrap-sha to the v0.41.0 commit so the first release PR doesn't enumerate all of history.
  • .github/workflows/release-please.yml: on push to main (or workflow_dispatch), opens / updates per-package release PRs. Merging a release PR produces the version tag + GitHub Release with the changelog body. Mirrors plugin-ci-workflows/.github/workflows/release-please.yml but drops the rolling major/minor tag step (not needed — this repo's consumers don't pin to floating major versions).
  • .github/workflows/release.yml: trigger now matches plugin-validator/v[0-9]*. New Extract release version step exposes RELEASE_VERSION (the bare semver) to GoReleaser.
  • .goreleaser.yaml: adds archives.name_template using RELEASE_VERSION. Required because the new tag contains a /, which would otherwise pollute the default {{ .Version }} archive name. Default release.mode: keep-existing is preserved — verified via goreleaser docs: "GoReleaser will not override [the existing release body] with its release notes, unless you configure it to do so (e.g. mode: replace)."
  • .github/workflows/release-mcp.yml and .goreleaser.mcp.yaml: unchanged. release-please naturally produces mcp/v* tags that already match the existing trigger and MCP_VERSION extraction.
  • package.json binWrapper.urlTemplate: updated to the new download path (releases/download/plugin-validator/v{{version}}/...). Old npm versions ship with the old URL and continue to resolve from existing releases.
  • HOW_TO_RELEASE.md: rewritten for the conventional-commit-driven flow.
  • Deletes do-release.yml and do-release-mcp.yml.

Tag format change

Root tags change from v0.41.0plugin-validator/v0.41.1. MCP keeps its existing mcp/v* format. Existing tags are untouched.

Verified the downstream consumer at grafana/community-pipeline/pkg/lib/getvalidator/get_validator.go is unaffected — it queries /repos/grafana/plugin-validator/releases/latest and filters assets by substring linux_amd64, never pattern-matching on tag names.

Test plan

  • Merge this PR.
  • Confirm Release Please runs on the merge to main and opens a chore(plugin-validator): release X.Y.Z PR.
  • Squash-merge the release PR.
  • Confirm the plugin-validator/v<X.Y.Z> tag is created and a GitHub Release exists with the changelog body.
  • Confirm Create release and publish triggered, GoReleaser uploaded plugin-validator_<ver>_<os>_<arch>.tar.gz assets, npm view @grafana/plugin-validator@<X.Y.Z> resolves, and Docker tag grafana/plugin-validator-cli:v<X.Y.Z> exists.
  • npx -p @grafana/plugin-validator@<X.Y.Z> plugincheck2 --help — verify the binWrapper resolves the new URL path.

The previous release flow (do-release{,-mcp}.yml → push commit + tag to
main from a workflow) is blocked by the org-level "Public repo required
PRs" ruleset. Replace the bespoke machinery with release-please, matching
the convention already used in grafana/plugin-ci-workflows and
grafana/plugin-actions.

- Add release-please-config.json with two packages (root → plugin-validator,
  mcp-package → mcp); bootstrap-sha pins the root changelog start to the
  v0.41.0 commit so the first release PR doesn't enumerate all of history.
- Add .release-please-manifest.json with current versions.
- Add .github/workflows/release-please.yml; on push to main it opens /
  updates per-package release PRs and on merge creates the tag + GitHub
  Release with the changelog body.
- Update release.yml to trigger on plugin-validator/v[0-9]* tags and pass
  RELEASE_VERSION (semver only) into goreleaser.
- Update .goreleaser.yaml archives.name_template to use RELEASE_VERSION;
  needed because the new tag contains a "/" which would otherwise pollute
  the default {{ .Version }} archive name.
- Update package.json binWrapper urlTemplate for the new download path.
- release-mcp.yml + .goreleaser.mcp.yaml unchanged: release-please produces
  mcp/v* tags that already match the existing trigger and MCP_VERSION
  extraction.
- GoReleaser default release.mode is keep-existing, which preserves the
  body release-please writes on the GitHub Release.
- Delete do-release.yml and do-release-mcp.yml.
- Rewrite HOW_TO_RELEASE.md for the conventional-commit-driven flow.

Supersedes #570.
Copy link
Copy Markdown
Collaborator

@academo academo left a comment

Choose a reason for hiding this comment

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

looks good. let's do a test after this merges

@github-project-automation github-project-automation Bot moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team May 8, 2026
@tolzhabayev tolzhabayev merged commit dcd8302 into main May 8, 2026
10 checks passed
@tolzhabayev tolzhabayev deleted the feat/release-please branch May 8, 2026 11:19
@github-project-automation github-project-automation Bot moved this from 🔬 In review to 🚀 Shipped in Grafana Catalog Team May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚀 Shipped

Development

Successfully merging this pull request may close these issues.

2 participants