Skip to content

Release workflow: merging a new version into main releases it - #44

Merged
bobnautic merged 1 commit into
mainfrom
claude/clever-mayer-fys7il
Nov 21, 2026
Merged

bobnautic merged 1 commit into
mainfrom
claude/clever-mayer-fys7il

Conversation

@bobnautic

Copy link
Copy Markdown
Owner

Releases no longer need a manual step after merging. A pull request that sets a new version (scripts/set-version.mjs) and adds its CHANGELOG.md section is the release: merging it builds, tags and publishes it.

How it works

  • Trigger: push to main with a path filter on src-tauri/tauri.conf.json. Path filters don't apply to tag pushes, so git push origin v… keeps working as before.
  • Version job (only for pushes to main):
    • reads the version from tauri.conf.json and compares it with the version before the push (github.event.before);
    • checks whether the tag v<version> already exists;
    • releases only if the version changed and has no tag yet. Otherwise the new output build=false skips every other job, so other edits to tauri.conf.json and versions that were already tagged by hand release nothing;
    • warns when CHANGELOG.md has no section for the version (the release then only lists the PRs).
  • Publish: the existing Tag step now also runs for main, creating v<version> on the built commit with the workflow token, so no second run starts.
  • Announce build and Report failed build stay limited to tag pushes. Run workflow, tag pushes and releases created on GitHub are unchanged.
  • Docs: releasing.md describes the pull request as the main way to release, with the other ways below it. CHANGELOG.md gets an Unreleased section with this change.

With this in place, merging #43 would have released v0.0.2 on its own.

Testing

I ran the Determine version script locally against clones of the repository (with and without the v0.0.2 tag) for every trigger:

Case Result
main push 0.1.0 → 0.0.2, tag exists build=false ("Tag v0.0.2 exists already")
main push 0.1.0 → 0.0.2, no tag build=true, version 0.0.2
main push, version unchanged build=false ("Version 0.0.2 unchanged")
main push, before = 000… (not fetchable) build=true if no tag (falls back to the tag check)
main push → 0.0.3-beta.1 without changelog build=true, prerelease=true, warning
tag push, pull request build=true, as before
Run workflow with an existing tag error, as before

release.yml parses as YAML. This PR changes release.yml, so the release workflow builds and checks all downloads on it again. The new main path itself only runs on the next version merge.


Generated by Claude Code

A push to main that changes the version in src-tauri/tauri.conf.json
(scripts/set-version.mjs) now starts the Release workflow. If the version
changed in that push and the tag v<version> does not exist yet, the
commit is built, tested, tagged and published like with "Run workflow";
the release notes take the version's CHANGELOG.md section. So a release
is just a pull request that sets the version and the changelog entry.

- Trigger: push to main with a path filter on tauri.conf.json (path
  filters do not apply to tag pushes, so those work as before).
- Version job: for main it compares the version with the one before the
  push and checks for the tag; new output "build" skips every other job
  when nothing is released (other tauri.conf.json edits, a version that
  was already tagged by hand). Warns when CHANGELOG.md has no section.
- Publish: the Tag step also runs for main (tag created with the
  workflow token on the built commit, no second run).
- "Announce build" and "Report failed build" stay tag-push only.
- Run workflow, tag pushes and releases created on GitHub are unchanged.
- Docs: releasing.md describes the pull request as the way to release;
  CHANGELOG.md gets an Unreleased section with this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017w9FQja85UGJGWm8LrX9WT
@bobnautic
bobnautic merged commit b209ed2 into main Nov 21, 2026
19 checks passed
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