Skip to content

feat(gen): add --auto-release-level flag, fix release-please App secrets - #1847

Merged
fiunchinho merged 1 commit into
mainfrom
add-release-please-auto-merge-level
May 28, 2026
Merged

feat(gen): add --auto-release-level flag, fix release-please App secrets#1847
fiunchinho merged 1 commit into
mainfrom
add-release-please-auto-merge-level

Conversation

@fiunchinho

Copy link
Copy Markdown
Member

What

Lets repositories opt the release-please workflow into auto-merging its Release PR, by wiring devctl to the auto-merge-level input added to the giantswarm/github-workflows release.yaml reusable workflow (giantswarm/github-workflows#185, merged).

  • New gen workflows flag --auto-release-level (none | patch | minor | major; default none), only meaningful with --release-workflow=release-please. It sets the reusable workflow's auto-merge-level input. Invalid values are rejected at gen time.
  • Fixes the generated secrets. The template still passed TAYLORBOT_GITHUB_ACTION, but the reusable workflow switched to GitHub App auth and now requires RELEASE_PLEASE_CLIENT_ID + RELEASE_PLEASE_PRIVATE_KEY (the former feeds create-github-app-token's client-id). The generated release-please.yaml was therefore non-functional against release.yaml@main; this corrects it.

Generated output

--auto-release-level minor:

  release_please:
    uses: giantswarm/github-workflows/.github/workflows/release.yaml@main
    permissions:
      contents: write
      pull-requests: write
    with:
      auto-merge-level: minor
    secrets:
      RELEASE_PLEASE_CLIENT_ID: ${{ secrets.RELEASE_PLEASE_CLIENT_ID }}
      RELEASE_PLEASE_PRIVATE_KEY: ${{ secrets.RELEASE_PLEASE_PRIVATE_KEY }}

Default (no flag) renders auto-merge-level: none.

Relationship to other PRs

Consuming-repo prerequisites for auto-merge

  • RELEASE_PLEASE_CLIENT_ID and RELEASE_PLEASE_PRIVATE_KEY available as org/repo secrets.
  • "Allow auto-merge" enabled in repo settings.
  • release-please GitHub App on the default branch's protection/ruleset bypass list.

Verification

  • go generate ./... && go build ./... and go test ./pkg/gen/input/workflows/... ./cmd/gen/workflows/... pass; gofmt/go vet clean.
  • Rendered end-to-end in a scratch repo for minor, default (none), and an invalid value (rejected by validation).

Add an `--auto-release-level` flag (none|patch|minor|major; default none)
to `gen workflows`, used with `--release-workflow=release-please`. It sets
the `auto-merge-level` input of the giantswarm/github-workflows release.yaml
reusable workflow, which auto-merges the Release Please PR when CI passes,
up to the given bump level.

Also fix the generated release-please.yaml secrets: it now passes
RELEASE_PLEASE_CLIENT_ID and RELEASE_PLEASE_PRIVATE_KEY (matching the
reusable workflow's App-based auth, where RELEASE_PLEASE_CLIENT_ID feeds
create-github-app-token's client-id) instead of TAYLORBOT_GITHUB_ACTION.
@fiunchinho fiunchinho self-assigned this May 27, 2026
@fiunchinho
fiunchinho marked this pull request as ready for review May 27, 2026 16:47
@fiunchinho
fiunchinho requested a review from a team as a code owner May 27, 2026 16:47
@fiunchinho
fiunchinho merged commit f014483 into main May 28, 2026
5 checks passed
@fiunchinho
fiunchinho deleted the add-release-please-auto-merge-level branch May 28, 2026 07:51
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.

2 participants