chore(release): plugin-version discipline — non-IaC adaptation (workflow#758)#19
Merged
Merged
Conversation
…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.
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
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, notsdk.ServeIaCPlugin).What changed
.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)minEngineVersion→0.61.0(requiressdk.ResolveBuildVersion+sdk.WithBuildVersionServeOption landed in workflow v0.61.0)capabilitiesblock (moduleTypes/stepTypes/triggerTypes) — required bywfctl plugin validate-contractCheck 2cmd/workflow-plugin-github/main.go: addsdk.WithBuildVersion(sdk.ResolveBuildVersion(internal.Version))as a ServeOption tosdk.Serve. Binary's runtime version surfaces viaGetManifestRPC even when committedplugin.jsonshows the sentinel.release.yml: pre-buildwfctl plugin validate-contract --for-publish+ post-build--release-dirverification;setup-wfctl@v1pinned tov0.61.0.Non-IaC adaptation note
sdk.WithBuildVersionis a ServeOption applied tosdk.Serve, NOT a field onIaCServeOptions(which doesn't apply here).sdk.WithBuildVersion(as the non-IaC equivalent ofIaCServeOptions.BuildVersion:.cmd/github-runner-provider/main.gountouched: it's a standalone HTTP server, not an sdk-served plugin binary. The goreleaser ldflag targetsinternal.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 ./...cleanGOWORK=off go test ./... -count=1PASS (2 packages, ~1s)wfctl plugin validate-contract .PASSwfctl plugin validate-contract --for-publish --tag v0.0.1 .PASSRollback
Revert PR; restores prior sync mechanism + workflow pin.
🤖 Generated with Claude Code