Add tag-driven release via workflow_dispatch - #6
Merged
Conversation
Let the "Build iCopy-X IPK" workflow create a release from a tag chosen at dispatch time, not only from a pushed v* tag. - Add a `release_tag` workflow_dispatch input. When set, the build jobs check out that tag's code and the release is published under it; empty keeps the old build-only behavior. - Add an `ensure-tag` job: if the given tag doesn't exist, create it at the dispatched branch's HEAD (github.sha), then build/release from it. Uses GITHUB_TOKEN so it doesn't re-trigger the on:push:tags build. The job always runs (no `if`) so it can't skip-propagate to downstream jobs. - Bind the release body's PM3 version to resolve-pm3-tag's output instead of an undefined env, so the clients table shows the actual PM3 release. Follow-up to #5. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Lets the Build iCopy-X IPK workflow create a GitHub release from a tag chosen at dispatch time, in addition to the existing
push: tags: v*trigger. Previously the release job only fired when av*tag was pushed, so a manual run against a branch (or a merged PR) built artifacts but never published a release.What changed
release_tagworkflow_dispatch input. Run the workflow from any branch and type a tag (e.g.v1.1.2). The build jobs check out that tag's code,ICOPYX_VERSIONis stamped from it, and a release is published under it. Leave the field empty for the old build-only behavior.ensure-tagjob. If the given tag doesn't exist, it's created at the HEAD commit of the branch you dispatched from (github.sha), then the build/release run from it. If the tag already exists it's used as-is (never moved). Created withGITHUB_TOKEN, so it does not re-trigger theon: push: tagsbuild (no double run). The job has noifso it always runs and no-ops on empty input — this avoids a skippedneedsjob cascading a skip to downstream jobs.resolve-pm3-tag's output instead of an undefined env, so it shows the actual PM3 release pulled during the build (it rendered blank on v1.1.1).Behavior matrix
v*tagrelease_tagemptyrelease_tag= existing tagrelease_tag= new tagNotes
v*tag-push releases are unaffected.ensure-tagandreleaseboth usepermissions: contents: write(same grant the release job already relied on to publish v1.1.1).Follow-up to #5.