Repository navigation
Release workflow: merging a new version into main releases it - #44
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Releases no longer need a manual step after merging. A pull request that sets a new version (
scripts/set-version.mjs) and adds itsCHANGELOG.mdsection is the release: merging it builds, tags and publishes it.How it works
pushtomainwith a path filter onsrc-tauri/tauri.conf.json. Path filters don't apply to tag pushes, sogit push origin v…keeps working as before.main):tauri.conf.jsonand compares it with the version before the push (github.event.before);v<version>already exists;build=falseskips every other job, so other edits totauri.conf.jsonand versions that were already tagged by hand release nothing;CHANGELOG.mdhas no section for the version (the release then only lists the PRs).main, creatingv<version>on the built commit with the workflow token, so no second run starts.releasing.mddescribes the pull request as the main way to release, with the other ways below it.CHANGELOG.mdgets 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.2tag) for every trigger:build=false("Tag v0.0.2 exists already")build=true, version 0.0.2build=false("Version 0.0.2 unchanged")before= 000… (not fetchable)build=trueif no tag (falls back to the tag check)build=true,prerelease=true, warningbuild=true, as beforerelease.ymlparses as YAML. This PR changesrelease.yml, so the release workflow builds and checks all downloads on it again. The newmainpath itself only runs on the next version merge.Generated by Claude Code