Skip to content

ci: move release-plz flow into mise tasks#234

Merged
zeitlinger merged 7 commits intomainfrom
codex/flint-release-tasks
Apr 28, 2026
Merged

ci: move release-plz flow into mise tasks#234
zeitlinger merged 7 commits intomainfrom
codex/flint-release-tasks

Conversation

@zeitlinger
Copy link
Copy Markdown
Member

@zeitlinger zeitlinger commented Apr 26, 2026

What changed

This moves the release-plz workflow logic into repository-owned mise tasks and keeps the release-managed README snippets in sync from the repo itself.

  • move release helpers into .mise/tasks/release/*
  • run release creation and release PR updates through mise instead of the dedicated release-plz action wrapper
  • rename the binary-release workflow to release-assets.yml and trigger it from the repo-managed release task
  • add sync-readme-snippets plus drift tests so README tool/version snippets stay aligned with current repo state
  • remove the README-specific Renovate rule in favor of scripted sync plus test coverage
  • add --allow-fixed so the docs-sync task can auto-fix generated docs and still succeed when everything was fixed cleanly

Why

This keeps the release workflow logic in the repository, makes local and CI behavior match more closely, and replaces ad hoc README version maintenance with a repeatable sync path guarded by tests.

Validation

  • cargo test readme_ -- --nocapture
  • cargo test repo_renovate_config_stays_aligned_with_shared_preset_contract -- --nocapture
  • mise run lint:fix
  • mise run lint

Base automatically changed from codex/flint-setup-version-migrations to main April 27, 2026 10:19
zeitlinger added a commit that referenced this pull request Apr 27, 2026
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger force-pushed the codex/flint-release-tasks branch from b3d499d to f6d3fc2 Compare April 27, 2026 10:41
@zeitlinger zeitlinger marked this pull request as ready for review April 27, 2026 10:50
@zeitlinger zeitlinger requested a review from a team as a code owner April 27, 2026 10:50
Copilot AI review requested due to automatic review settings April 27, 2026 10:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR moves release automation into repo-owned mise tasks, adds automated syncing/testing for README tool/version snippets, and updates flint to support a --allow-fixed mode for autofix workflows.

Changes:

  • Add --allow-fixed to flint run --fix and add CLI/e2e coverage around the new behavior.
  • Introduce sync-readme-snippets plus a drift test to keep README mise.toml snippets aligned with repo tool versions.
  • Rework release management to use mise tasks (and rename the binary release workflow to release-assets.yml), and simplify Renovate rules accordingly.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/cases/shfmt/auto-fix-allow-fixed/test.toml Adds an e2e case asserting --allow-fixed succeeds after applying fixes.
tests/cases/shfmt/auto-fix-allow-fixed/files/script.sh Fixture shell script used by the new shfmt autofix test.
tests/cases/shfmt/auto-fix-allow-fixed/files/mise.toml Fixture mise.toml pinning shfmt for the new test.
tests/cases/general/allow-fixed-requires-fix/test.toml Adds a CLI validation test that --allow-fixed requires --fix.
tests/cases/general/allow-fixed-requires-fix/files/.gitkeep Empty fixture directory placeholder for the new CLI test case.
src/registry/tests.rs Adds README snippet drift test and updates generated docs scope links.
src/main.rs Implements --allow-fixed flag and threads it through fix outcome handling.
src/bin/sync-readme-snippets.rs New helper binary to rewrite README fenced TOML blocks from repo state.
release-plz.toml Simplifies release-plz config by removing custom PR body.
mise.toml Adds release-plz tool, updates lint tasks to run the flint bin explicitly, and adds a release PR task.
docs/linters.md Updates scope links/section structure for per-scope anchors.
README.md Updates tool versions/snippets and tweaks setup wording.
.mise/tasks/release/update New task to run release-plz update then sync release-managed docs.
.mise/tasks/release/docs-sync New task to sync README snippets and run flint in fix mode with --allow-fixed.
.mise/tasks/release/create New task to create releases (JSON output) and trigger the assets workflow.
.github/workflows/release-plz.yml Switches from release-plz/action to mise-driven release management.
.github/workflows/release-assets.yml Renames the workflow display name to match new release assets naming.
.github/renovate.json5 Removes the README-specific Renovate rule now covered by sync + tests.
.github/renovate-tracked-deps.json Updates tracked workflow paths after renames/adjustments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/linters.md Outdated
Comment thread src/registry/tests.rs
Comment thread src/bin/sync-readme-snippets.rs Outdated
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger force-pushed the codex/flint-release-tasks branch from f7c5de1 to 183ab0d Compare April 28, 2026 13:44
@zeitlinger zeitlinger merged commit 320afc6 into main Apr 28, 2026
13 checks passed
@zeitlinger zeitlinger deleted the codex/flint-release-tasks branch April 28, 2026 15:40
zeitlinger added a commit that referenced this pull request Apr 28, 2026
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
zeitlinger added a commit that referenced this pull request May 8, 2026
## Summary

- Pass `--git-token` and `--forge github` to `release-plz release` and
`release-plz release-pr` from the workflow as usage args.
- Extract `release:pr` from inline `mise.toml` to
`.mise/tasks/release/pr` so it can forward variadic args the same way
`release:create` already does.

## Why

release-plz 0.3.x requires explicit `--git-token` and `--forge` for both
`release` and `release-pr`. Without them, both fail with:

```text
ERROR git release not configured. Did you specify git-token and forge?
```

Every release-plz workflow run since
[#234](#234) has been failing for
that reason, leaving release PR
[#242](#242) stuck on its
2026-04-28 snapshot. After this merges, the next push to `main` will
refresh #242 with all merged commits since.

## Test plan

- [ ] CI green on this PR
- [ ] After merge, next push to `main` refreshes #242 with all merged
commits + correct version bump (note: `#270` was `refactor!` so the bump
should be a major increment per release-plz semantics)

---------

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
This was referenced May 8, 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.

3 participants