Skip to content

Create a release when a tag is pushed on main - #13

Merged
d6e merged 1 commit into
mainfrom
release-on-tag
Oct 5, 2026
Merged

d6e merged 1 commit into
mainfrom
release-on-tag

Conversation

@d6e

@d6e d6e commented Oct 5, 2026

Copy link
Copy Markdown
Owner

The release workflow now runs when a tag that starts with v is pushed, instead of after a release is created by hand.

  • It stops if the tagged commit is not on main.
  • A tag with a hyphen, such as v0.6.1-rc.2, becomes a pre-release. For any other tag, the version in Cargo.toml must match.
  • It runs the tests, creates the release with generated notes, and attaches the Windows, Linux and macOS builds.

Checked with actionlint. I also ran the tag check script locally against the real Cargo.toml: v0.6.0 passes as a full release, v0.6.1 is refused, and v0.6.1-rc.2 becomes a pre-release. The workflow itself first runs on the next tag push. ARCHITECTURE.md has a short "Releasing" section.

The release workflow ran only after someone created a GitHub release by
hand. It now runs when a tag that starts with v is pushed:

- It stops if the tagged commit is not on main.
- For a tag without a hyphen, the tag must match the version in
  Cargo.toml. A tag with a hyphen (for example v0.6.1-rc.2) becomes a
  pre-release and skips that check.
- It runs the tests, creates the release with generated notes (or uses
  a release that already exists for the tag), and attaches the three
  builds.

One workflow creates the release and builds the assets, because GitHub
does not start other workflows for a release that a workflow creates
with its own token. ARCHITECTURE.md describes the steps.
@d6e
d6e merged commit 6524476 into main Oct 5, 2026
2 checks passed
@d6e
d6e deleted the release-on-tag branch October 5, 2026 03: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.

1 participant