← Back to Pull requests

chore: release-please and shared release workflows #36

Closed
unknown closed this pull request without merging on Oct 13, 2026 16:56 UTC
View on GitHub
unknown unknown commented on Oct 13, 2026 16:05 UTC
Author

Why

The plugin joins the release flow: release-please opens release PRs, and the shared release-go-plugin.yml publishes a release when it's published, instead of a goreleaser run on any pushed tag.

Default branch: main. The base of this PR is main, and every push: branches: trigger here uses [main].

What changes

  • release-please-config.json: the shared defaults from workflows release-please/defaults.json at v1.5.2 (no drift), with packages: {".": {"release-type": "go"}}.

  • .release-please-manifest.json: seeded at 0.2.8, the latest final release (releases/latest is v0.2.8, a vX.Y.Z tag whose commit is an ancestor of main). The repo also has v0.2.8-rc1, on the same commit as v0.2.8; it's an rc, so it isn't the seed. Since v0.2.8 there are feat commits (#30, #31, #33), so the first release PR should propose 0.3.0 (bump-minor-pre-major).

  • New callers, all pinned to workflows v1.5.2 (6e7fc9c), copied from mock-plugin-1 (and cut-prerelease.yml from mock-plugin-policies-1): release-please.yml (push to main), release.yml (release: published, protocol-version: "2"), preview.yml (kind: go-plugin, on-main: false, so only the preview label publishes :pr-<n>) and cut-prerelease.yml (workflow_dispatch, rc tags vX.Y.Z-rcN).

  • ci.yml: unchanged. It already pins v1.5.2 and calls release-checks.yml.

  • .goreleaser.yaml: adds release: {prerelease: auto, replace_existing_artifacts: true}. The shared job refuses to run without prerelease: auto and warns without replace_existing_artifacts. Builds (binary: plugin, linux and darwin) and archives are unchanged.
  • Deleted

  • .github/workflows/build-and-upload.yml: reusable job that ran goreleaser (~> v2, creating the GitHub release and its assets) and uploaded dist/ with gooci v0.0.7 to :<tag> and :latest.

  • .github/workflows/release.yml (old content, replaced by the new caller of the same name): on any tag push (), called build-and-upload.yml.
  • The old workflows published nothing else (no container image, no extra assets): the GitHub release archives + checksums, and the OCI artifact. The shared workflow publishes both.

    Published artifacts: old vs new

    | | Old (tag push) | New (release: published) |
    | --- | --- | --- |
    | Trigger | push of any tag (
    ) | GitHub release published by release-please or cut-prerelease (tags are vX.Y.Z / vX.Y.Z-rcN) |
    | GitHub release | created by goreleaser from the tag | created by release-please; goreleaser attaches the archives to it |
    | Release assets | 5 archives + checksums | same names; same contents, since the builds and archives config is unchanged (snapshot below) |
    | OCI tags | :<tag> and :latest | :vX.Y.Z, plus :latest only for a final tag |
    | rc handling | latest was gated on github.event.release.prerelease, which is empty on a tag push, so an rc tag also moved latest; goreleaser had no prerelease: auto, so v0.2.8-rc1 is a full (non-pre) GitHub release | an rc publishes only :vX.Y.Z-rcN and stays a pre-release; latest is untouched |
    | latest digest | a second, separate upload (v0.2.8 and latest are different digests today) | crane tag points latest at the vX.Y.Z manifest: one digest |
    | Upload | gooci upload dist/, no annotation | gooci upload --annotate=org.ccf.plugin.protocol.version=2 dist/ |
    | Tool versions | goreleaser ~> v2, gooci v0.0.7 | goreleaser v2.18.2, gooci v0.0.7, crane v0.20.7 |

    Two visible differences:

  • New protocol annotation. The published v0.2.8 manifest has no org.ccf.plugin.protocol.version annotation, so an agent whose config doesn't set protocol_version runs this plugin as protocol v1 today. main.go serves runner.RunnerV2GRPCPlugin, so protocol-version: "2" is correct, but from the next release such agents will run it as v2 and call Init (which registers the subject templates). This is the intended behaviour for a v2 plugin; flagging it because it changes what existing deployments do.

  • The latest index's org.opencontainers.image.ref.name / org.opencontainers.image.version annotations will read vX.Y.Z instead of latest, because latest is now the same manifest as the version tag.
  • Verified locally

  • go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12: clean.

  • go build ./... and go test ./...: pass.

  • goreleaser check and goreleaser release --snapshot --clean (v2.16.0): dist/ has plugin-cloud-custodian_{Darwin_arm64,Darwin_x86_64,Linux_arm64,Linux_i386,Linux_x86_64}.tar.gz and a checksums file, the same asset names as the v0.2.8 release. Each archive holds LICENSE, README.md, plugin and readme_accounts_test.go: goreleaser's default archive files include readme*, which has matched that test file since #34. This isn't caused by this PR (the old workflow used the same archive config), and the archive contents are left as they are.

  • release-please-config.json compared with workflows release-please/defaults.json at v1.5.2: no differing keys.

  • The new callers are identical to the reviewed batch-1 pilot (compliance-framework/plugin-github-repositories#26) apart from the main branch.
  • The README doesn't describe releasing, so it is unchanged.

    This PR stays open until the batch's repo settings are applied (the release environment holds the ccf-release-bot secrets release-please needs).

    Task: W3-S2-T01 (local-dev/docs/release-automation/workstream-3-plugins-in-train.md)

    🤖 Generated with Claude Code

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: gusfcarvalho Review duration: 51m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #36"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.5% · Safe to merge
    20.5%