Skip to content

ci: add dispatchable Prepare Release workflow - #113

Merged
geekgonecrazy merged 1 commit into
devfrom
chore/release-dispatch-workflow
Jul 13, 2026
Merged

geekgonecrazy merged 1 commit into
devfrom
chore/release-dispatch-workflow

Conversation

@geekgonecrazy

Copy link
Copy Markdown
Contributor

What

Adds a one-button, manually-dispatched release process — no PAT required.

prepare-release.yml (new)

Run from the Actions UI with a version (e.g. `0.9.1`). It:

  1. Validates the semver and bumps `[workspace.package].version` in `Cargo.toml`, syncing `Cargo.lock` via `cargo update --workspace`.
  2. Commits `Bump version to ` to `dev`.
  3. Merges `dev` → `release` (`--no-ff`, matching existing history).
  4. Invokes the release build via `workflow_call`, passing the merged commit SHA.

release.yml (modified — now triggerable 3 ways)

  • workflow_call with an optional `ref` input — lets the dispatch workflow chain the build in the same run, so the default `GITHUB_TOKEN` is sufficient (the anti-recursion rule only blocks cross-run triggers).
  • tags: ['v*'] push trigger — a plain tag push still cuts a release.
  • Existing push: branches: [release] trigger retained — current manual path unchanged.
  • All checkouts honor `inputs.ref` (fallback `github.ref`); release `--target` is resolved from checked-out `HEAD` rather than `github.sha` (wrong under `workflow_call`).

Notes for reviewers

  • The "Run workflow" button only appears once `prepare-release.yml` reaches the repo's default branch (`release`), i.e. after this merges to `dev` and `dev` → `release`.
  • The workflow pushes to `dev`/`release` with `GITHUB_TOKEN`; if those branches have protection requiring PRs, Actions needs bypass permission.

Add a workflow_dispatch 'Prepare Release' workflow that bumps the
workspace version, merges dev into release, and invokes the release
build directly via workflow_call (no PAT needed).

Make release.yml reusable and tag-triggerable:
- add workflow_call with an optional ref input
- add a tags: ['v*'] push trigger (keeps existing release-branch push)
- honor inputs.ref on all checkouts
- resolve the release --target from the checked-out HEAD
@geekgonecrazy
geekgonecrazy merged commit af03f99 into dev Jul 13, 2026
8 checks passed
@geekgonecrazy
geekgonecrazy deleted the chore/release-dispatch-workflow branch July 13, 2026 21:05
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