Skip to content

ci: add reusable release-plz workflows, deprecate knope - #22

Closed
BatmanAoD wants to merge 6 commits into
mainfrom
adopt-release-plz
Closed

BatmanAoD wants to merge 6 commits into
mainfrom
adopt-release-plz

Conversation

@BatmanAoD

Copy link
Copy Markdown
Collaborator

Adds reusable release-plz workflows that work with GITHUB_TOKEN alone (no PAT, no GitHub App), and deprecates the knope ones.
Design and assumptions: agent-choices.md.

Changes

  • fix: default build matrix and this repository's setup-rust CI job use macos-latest; GitHub rejects macos-14.
  • feat: rust-cli-build.yml gets an optional version input (applies release-plz set-version in the runner only).
  • feat: release-plz.yml: on pushes to the default branch, release-plz release (tag and draft release), build from the tag, upload, then publish; then release-plz release-pr.
    A release is never visible without its binaries, and nothing depends on a tag or release triggered workflow.
    With bin set, it refuses to run unless git_release_draft = true.
  • feat: release-plz-prerelease.yml: dispatch on a branch with an explicit 1.2.3-rc.0 version; builds as that version and publishes a prerelease.
    Nothing is pushed.
    release-plz has no prerelease mode, so this does not use it to release.
  • fix: knope workflows marked deprecated, inputs unchanged.
    prepare-prerelease.yml and rust-cli-prerelease.yml now make token optional with a github.token fallback (it was required, and contents: read capped it).
  • docs: README sections and a knope migration guide.

Compatibility: nothing is removed or changed incompatibly, so callers pinned to @v0.4.x keep working.
Removing the knope workflows is a follow-up breaking release.
This repository's own release still uses knope.

Sibling design: rigetti/todo-curator#57 (inline equivalent); see the open questions in agent-choices.md for the differences.

Verified locally

  • Workflow files parse (yq); every run: block passes shellcheck.
  • The draft-config check against fixtures.
  • release-plz 0.4.3: set-version with a changelog-less config, update, config parsing.

Not verified

  • actionlint (not installed; download blocked).
  • Any run in GitHub Actions: no release, draft, tag, or prerelease was created.
    Untested: release-plz release with a draft, the tag existing before build, gh release upload and edit --draft=false, gh release create --prerelease, the GITHUB_TOKEN fallback in the prerelease knope workflows.

Manual steps

  • In each calling repository: enable "Allow GitHub Actions to create and approve pull requests".
  • Approve the held pull_request runs of release PRs, or pass the optional token secret.
  • Try it on a throwaway repository before migrating a real one.

🤖 Generated with Claude Code

https://claude.ai/code/session_01K3mkz6m3aZBokQhgvfjnSv

BatmanAoD and others added 6 commits November 12, 2026 08:42
GitHub rejects the `macos-14` runner label with "The configuration
'macos-14-arm64-us-default' is not supported".
The default build matrix of `rust-cli-build.yml` and this repository's own
`setup-rust` job therefore could not start on macOS.
`macos-latest` is arm64 and keeps the `aarch64-apple-darwin` target working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K3mkz6m3aZBokQhgvfjnSv
An optional `version` input applies `release-plz set-version` in the runner's
checkout before building.
Nothing is committed.
This lets a prerelease build report a version that no commit carries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K3mkz6m3aZBokQhgvfjnSv
`release-plz.yml` opens a release PR on pushes to the default branch.
Merging it tags and drafts the release, builds the binaries, attaches them,
and only then publishes.
`release-plz-prerelease.yml` publishes a release candidate from a branch.
Both work with `GITHUB_TOKEN` alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K3mkz6m3aZBokQhgvfjnSv
The knope workflows are marked deprecated and keep their inputs.
`prepare-prerelease.yml` and `rust-cli-prerelease.yml` no longer require
`token`: they fall back to the job's own token, and the former no longer caps
it at `contents: read`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K3mkz6m3aZBokQhgvfjnSv
It lets consumers use a version of the tool that includes unmerged work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K3mkz6m3aZBokQhgvfjnSv
@BatmanAoD

Copy link
Copy Markdown
Collaborator Author

deferring widespread adoption of release-plz for now

@BatmanAoD BatmanAoD closed this Nov 12, 2026
@BatmanAoD
BatmanAoD deleted the adopt-release-plz branch November 12, 2026 16:38
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