Skip to content

fix(release): align release automation with shared pipeline guide - #34

Merged
jamestelfer merged 2 commits into
mainfrom
release-pipeline-onboarding-audit
Jul 9, 2026
Merged

jamestelfer merged 2 commits into
mainfrom
release-pipeline-onboarding-audit

Conversation

@jamestelfer

Copy link
Copy Markdown
Owner

Purpose

Keep imds-broker's release automation compliant with the shared chinmina/.github release pipeline, so that a release actually fires and publishes provenance-attested artifacts on the first run rather than stalling or silently publishing before attestation.

An audit against the canonical onboarding guide (docs/adopting-the-release-pipeline.md on verified-actions) and the relic worked example found the repo had drifted from several pipeline contracts after guide updates. Each deviation is a latent release failure:

  • Caller workflows granted the GITHUB_TOKEN ceiling at the workflow level instead of the secure-by-default shape (workflow permissions: {}, grant on the calling job). This is the drift the guide flags as most common and highest-risk, keeping the token off every job that does not need it. The keyless octo-sts token source is preserved and correctly passes no secrets.
  • goreleaser was missing release.mode: keep-existing, breaking the draft trio. Without all three of draft/keep-existing/use_existing_draft, goreleaser creates a duplicate release and bypasses the attest-before-publish gate — the wrapper preflights this and refuses to run.
  • The Homebrew cask lacked skip_upload: auto, so a prerelease/RC tag would wrongly publish the cask (the release-level prerelease: auto does not gate the cask push). The quarantine-xattr hook is also aligned to the guide's canonical form.
  • mise.toml used the ubi-only exe field for binstaller instead of rename_exe required by the github: backend, which would leave the binst CLI off PATH during release.

Context

  • Source of truth: chinmina/.githubdocs/adopting-the-release-pipeline.md and docs/release-workflows.md (verified-actions branch), cross-checked against the live release-please.yml / goreleaser-release.yml reusable-workflow contracts and the docs/examples/relic/ worked example.
  • Onboarding parameters confirmed from existing config (not assumed): Go toolchain, octo-sts token source, channels = GitHub release + binstaller + homebrew + npm (opt-in on), existing repo already on the pipeline.
  • Verification: actionlint clean; goreleaser check valid; just verify passes. zizmor was run via its container image (ghcr.io/zizmorcore/zizmor:1.25.2) because the native arm64 binary aborts on this host's 16K memory page size — no secrets-inherit findings and no findings introduced by these changes; the only errors are unpinned-uses on the @verified-actions refs, which are inherent to the guide's prescribed shape (the relic example produces the identical finding).
  • Change detail: see commit history.

Correct four contract deviations against the chinmina/.github release
pipeline onboarding guide (verified-actions), matching the relic example:

- callers: set workflow-level `permissions: {}` and grant the GITHUB_TOKEN
  ceiling on the calling job (secure-by-default shape) in both
  release-please.yml and release.yml; octo-sts path keeps no `secrets:`
- goreleaser: add `release.mode: keep-existing` to complete the draft trio
  (draft + keep-existing + use_existing_draft) so goreleaser fills the
  release-please draft instead of creating a duplicate release
- goreleaser: add `skip_upload: auto` to the homebrew cask so it is not
  pushed on prerelease tags, and align the quarantine-xattr hook to the
  guide's canonical `system "xattr" ...` form
- mise: use `rename_exe` for binstaller (the github: backend field), not
  the ubi-only `exe`, per the Declaring binstaller contract

Validated with actionlint (clean) and goreleaser check. zizmor run via its
container image: the native arm64 build aborts on this host's 16K page size.
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jamestelfer, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a23c5be6-b6b3-4ab0-bfa3-838360d249d6

📥 Commits

Reviewing files that changed from the base of the PR and between d88580e and bfba063.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • .github/workflows/npm/main/package.json
  • .github/workflows/pr-title.yml
📝 Walkthrough

Walkthrough

This PR hardens GitHub Actions workflow permissions by defaulting to permissions: {} at the workflow level and granting specific scopes at the job level for release-please.yml and release.yml. It also updates .goreleaser.yaml release/cask settings and renames a mise.toml tool field.

Changes

CI Permission Hardening and Release Tooling

Layer / File(s) Summary
release-please workflow permission scoping
.github/workflows/release-please.yml
Workflow-level permissions set to {}; contents: read and id-token: write moved into the job-level permissions block with explanatory comments.
release workflow permission scoping
.github/workflows/release.yml
Workflow-level permissions set to {}; job-level grants added for contents: write, id-token: write, attestations: write; reusable workflow call and inputs retained with clarifying comments.
Goreleaser release and cask config updates
.goreleaser.yaml
Adds mode: keep-existing to the release section; adds skip_upload: auto and switches the macOS post-install xattr removal to system "xattr", "-dr", ....
mise.toml binstaller tool key rename
mise.toml
Renames the binstaller tool's exe field to rename_exe, keeping version 0.12.0.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: aligning release automation with the shared pipeline guide.
Description check ✅ Passed The description is directly related to the workflow and release config changes in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- npm package.json: license was MIT but the repo is Apache-2.0; align the
  published package metadata to the actual LICENSE
- ci.yml: bump hash-pinned third-party actions to current releases —
  actions/checkout v6.0.3->v7.0.0, actions/setup-go v6.4.0->v6.5.0,
  jdx/mise-action v4.1.0->v4.2.0
- pr-title.yml: hash-pin the jamestelfer/.github reusable workflow (was a
  floating @main ref) to its current commit, clearing the zizmor
  unpinned-uses finding

chinmina reusable workflows intentionally remain on @verified-actions per
the release pipeline contract.
@jamestelfer
jamestelfer merged commit 1621a87 into main Jul 9, 2026
4 checks passed
@jamestelfer
jamestelfer deleted the release-pipeline-onboarding-audit branch July 9, 2026 00:24
@octo-sts octo-sts Bot mentioned this pull request Jul 9, 2026
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