Skip to content

chore(release): plugin-version discipline — non-IaC adaptation (workflow#758)#19

Merged
intel352 merged 1 commit into
mainfrom
chore/758-release-discipline
May 23, 2026
Merged

chore(release): plugin-version discipline — non-IaC adaptation (workflow#758)#19
intel352 merged 1 commit into
mainfrom
chore/758-release-discipline

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

Layer 3 migration to the workflow#758 plugin-version-discipline pattern. Mirrors workflow-plugin-digitalocean PR #165, adapted for the non-IaC case (this plugin uses sdk.Serve, not sdk.ServeIaCPlugin).

What changed

  • Delete .github/workflows/sync-plugin-version.yml — sync mechanism retired; goreleaser before-hook + binary ldflag carry release-tag truth.
  • plugin.json:
    • version"0.0.0" (dev sentinel; release builds inject the real tag via goreleaser before-hook)
    • minEngineVersion0.61.0 (requires sdk.ResolveBuildVersion + sdk.WithBuildVersion ServeOption landed in workflow v0.61.0)
    • Add capabilities block (moduleTypes/stepTypes/triggerTypes) — required by wfctl plugin validate-contract Check 2
  • cmd/workflow-plugin-github/main.go: add sdk.WithBuildVersion(sdk.ResolveBuildVersion(internal.Version)) as a ServeOption to sdk.Serve. Binary's runtime version surfaces via GetManifest RPC even when committed plugin.json shows the sentinel.
  • release.yml: pre-build wfctl plugin validate-contract --for-publish + post-build --release-dir verification; setup-wfctl@v1 pinned to v0.61.0.
  • Bump workflow pin v0.53.1 → v0.61.0.

Non-IaC adaptation note

  • sdk.WithBuildVersion is a ServeOption applied to sdk.Serve, NOT a field on IaCServeOptions (which doesn't apply here).
  • validate-contract Check 4 explicitly accepts sdk.WithBuildVersion( as the non-IaC equivalent of IaCServeOptions.BuildVersion:.
  • cmd/github-runner-provider/main.go untouched: it's a standalone HTTP server, not an sdk-served plugin binary. The goreleaser ldflag targets internal.Version, shared between both binaries.
  • internal.Version = "dev" already existed (internal/plugin.go:11); no new Version var addition needed.

Test plan

  • GOWORK=off go build ./... clean
  • GOWORK=off go test ./... -count=1 PASS (2 packages, ~1s)
  • wfctl plugin validate-contract . PASS
  • wfctl plugin validate-contract --for-publish --tag v0.0.1 . PASS
  • CI green

Rollback

Revert PR; restores prior sync mechanism + workflow pin.

🤖 Generated with Claude Code

…low#758)

Mirrors workflow-plugin-digitalocean PR #165 with the non-IaC adaptation
(this plugin uses sdk.Serve, not sdk.ServeIaCPlugin):

- Delete .github/workflows/sync-plugin-version.yml (sync mechanism retired;
  goreleaser before-hook + binary ldflag carry release-tag truth)
- plugin.json.version → "0.0.0" (sentinel; flat M.m.p parses through
  PluginManifest.ParseSemver without prerelease)
- plugin.json.minEngineVersion → 0.61.0 (requires sdk.ResolveBuildVersion +
  sdk.WithBuildVersion ServeOption landed in workflow v0.61.0)
- plugin.json: add "capabilities" block (moduleTypes/stepTypes/triggerTypes)
  required by wfctl plugin validate-contract Check 2
- cmd/workflow-plugin-github/main.go: add sdk.WithBuildVersion ServeOption
  with sdk.ResolveBuildVersion(internal.Version); binary's runtime version
  surfaces via GetManifest RPC even when committed plugin.json shows the
  sentinel. Non-IaC variant: WithBuildVersion is a ServeOption to
  sdk.Serve, not a field on IaCServeOptions.
- release.yml: pre-build wfctl plugin validate-contract --for-publish +
  post-build --release-dir verification; setup-wfctl pinned to v0.61.0
- Bump workflow pin v0.53.1 → v0.61.0

cmd/github-runner-provider/main.go untouched: standalone HTTP server, not
an sdk-served plugin binary; goreleaser ldflag targets only internal.Version
which is shared between both binaries via the same package.

Note: internal.Version = "dev" already existed in internal/plugin.go (line 11);
no Version var addition needed.

Rollback: revert PR; restores prior sync mechanism + workflow pin.
@intel352 intel352 merged commit 925e7bf into main May 23, 2026
5 checks passed
@intel352 intel352 deleted the chore/758-release-discipline branch May 23, 2026 21:04
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.

1 participant