Skip to content

ci: adopt consolidated ospo-reusable-workflows release.yaml#211

Merged
jmeridth merged 2 commits into
mainfrom
ci/consolidated-release-workflow
May 11, 2026
Merged

ci: adopt consolidated ospo-reusable-workflows release.yaml#211
jmeridth merged 2 commits into
mainfrom
ci/consolidated-release-workflow

Conversation

@jmeridth

Copy link
Copy Markdown
Member

What

Bump the release.yaml reusable workflow pin to v1.0.0 (592067a6...), which collapses the previous three-workflow release/release-image/release-discussion pipeline into a single draft-first workflow. Also add a "Breaking Changes" category to release-drafter so PRs labeled breaking get their own section in the generated changelog.

Why

The pinned SHA was the pre-consolidation version. Moving to v1.0.0 puts this repo on the supported release flow and aligns it with the pvtr CLI's release workflow. Because pvtr-sdk ships no binaries or container images, only the create_release / publish_release portion of the consolidated workflow runs; the existing contents: write + pull-requests: read permissions are still all that's needed. The "Breaking Changes" category matches the upstream release-drafter template (github-community-projects/ospo-reusable-workflows#134); the breaking label was already wired up under version-resolver.major, so this just surfaces those PRs in their own changelog section.

Notes

  • No goreleaser-config-path or image-name inputs are passed, so the optional release_goreleaser and release_image jobs in the reusable workflow are skipped at the job-level if: and never spin up runners.
  • Likewise, no id-token: write / attestations: write permissions are needed here since there are no artifacts to attest.
  • create-discussion is intentionally not enabled; flip on later with the input plus discussion-repository-id / discussion-category-id secrets if we want auto-announcements.

Testing

  • make test — passes (command, config, internal/..., pluginkit, utils all green).
  • golangci-lint run ./... — 0 issues.
  • End-to-end release flow is not exercised locally; first real validation will be the next merged PR carrying a feature/fix/breaking/vuln/release label that fires pull_request_target: closed. Watch for: release-drafter creating a draft, create_release pushing the new tag plus the major-version moving tag, optional jobs (release_goreleaser, release_image, release_discussion) showing as skipped, and publish_release flipping the draft to published.

## What

Bump the `release.yaml` reusable workflow pin to v1.0.0 (`592067a6...`), which collapses the previous three-workflow release/release-image/release-discussion pipeline into a single draft-first workflow. Also add a "Breaking Changes" category to release-drafter so PRs labeled `breaking` get their own section in the generated changelog.

## Why

The pinned SHA was the pre-consolidation version. Moving to v1.0.0 puts this repo on the supported release flow and aligns it with the pvtr CLI's release workflow. Because pvtr-sdk ships no binaries or container images, only the `create_release` / `publish_release` portion of the consolidated workflow runs; the existing `contents: write` + `pull-requests: read` permissions are still all that's needed. The "Breaking Changes" category matches the upstream release-drafter template (github-community-projects/ospo-reusable-workflows#134); the `breaking` label was already wired up under `version-resolver.major`, so this just surfaces those PRs in their own changelog section.

## Notes

- No `goreleaser-config-path` or `image-name` inputs are passed, so the optional `release_goreleaser` and `release_image` jobs in the reusable workflow are skipped at the job-level `if:` and never spin up runners.
- Likewise, no `id-token: write` / `attestations: write` permissions are needed here since there are no artifacts to attest.
- `create-discussion` is intentionally not enabled; flip on later with the input plus `discussion-repository-id` / `discussion-category-id` secrets if we want auto-announcements.

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth self-assigned this May 10, 2026
@jmeridth jmeridth marked this pull request as ready for review May 10, 2026 23:20
@jmeridth jmeridth requested a review from a team as a code owner May 10, 2026 23:20
## What

Bump the pin on ospo-reusable-workflows/release.yaml from v1.0.0 to v1.0.1 (SHA e92cb6053ace495fe40a5f185988557afcdcecbc).

## Why

v1.0.1 lands two fixes from upstream PR github-community-projects/ospo-reusable-workflows#138:
1. release_discussion runs only after publish_release succeeds (no announcing releases that never published).
2. release_goreleaser auto-installs syft when GoReleaser config declares an sboms: block.

## Notes

- No caller-side configuration changes are required; v1.0.1 is backward-compatible with v1.0.0 inputs and secrets.

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth merged commit 31a7cf8 into main May 11, 2026
8 checks passed
@jmeridth jmeridth deleted the ci/consolidated-release-workflow branch May 11, 2026 03:55
jmeridth added a commit that referenced this pull request May 11, 2026
## What

Expand the `release` job's `permissions:` block to grant `id-token: write`, `attestations: write`, `packages: write`, and `discussions: write` in addition to the existing two. The block now covers the union of permissions declared by every job in the called `ospo-reusable-workflows/release.yaml@v1.0.1`.

## Why

The merge of #211 left main on the consolidated workflow with only `contents: write` + `pull-requests: read`. The `pull_request_target: closed` Release run that fired on merge failed with `startup_failure`: "The nested job 'release_image' is requesting 'attestations: write, packages: write, id-token: write', but is only allowed ...". GitHub validates each nested job's `permissions:` against the caller's grant at workflow startup, **before** evaluating that job's `if:` — except when the gate folds statically to `false`. The gates on `release_goreleaser` (`inputs.goreleaser-config-path != ''`) and `release_image` (`inputs.image-name != ''`) are string comparisons the validator can't fold, so their perms are checked even though both jobs would have been skipped at runtime here (this repo sets neither input).

## Notes

- `release_discussion`'s gate (`inputs.create-discussion && ...`) DOES fold statically (boolean default `false`), so the validator skips it today and `discussions: write` is not technically required. Granting it anyway as a defensive measure in case the upstream rearranges that `if:` later.
- This PR carries the `release` label so the now-fixed workflow fires on merge and cuts the release that #211 never produced. Worth confirming the `Release` run on the merge commit completes (create_release + publish_release succeed, release_goreleaser / release_image / release_discussion skipped).

Signed-off-by: jmeridth <jmeridth@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants