Skip to content

Add tag-driven release via workflow_dispatch - #6

Merged
quantum-x merged 1 commit into
mainfrom
feat/dispatch-tag-release
Jul 3, 2026
Merged

Add tag-driven release via workflow_dispatch#6
quantum-x merged 1 commit into
mainfrom
feat/dispatch-tag-release

Conversation

@quantum-x

@quantum-x quantum-x commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

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 a v* tag was pushed, so a manual run against a branch (or a merged PR) built artifacts but never published a release.

What changed

  • New release_tag workflow_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_VERSION is stamped from it, and a release is published under it. Leave the field empty for the old build-only behavior.
  • New ensure-tag job. 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 with GITHUB_TOKEN, so it does not re-trigger the on: push: tags build (no double run). The job has no if so it always runs and no-ops on empty input — this avoids a skipped needs job cascading a skip to downstream jobs.
  • PM3 version in the release body. Bound the clients table's PM3 version to 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

Trigger Result
Push v* tag Release built from the tag (unchanged)
Dispatch, release_tag empty Build-only, no release (unchanged)
Dispatch, release_tag = existing tag Build from that tag, publish release
Dispatch, release_tag = new tag Tag created on selected branch's HEAD, then build + release

Notes

  • Existing v* tag-push releases are unaffected.
  • ensure-tag and release both use permissions: contents: write (same grant the release job already relied on to publish v1.1.1).

Follow-up to #5.

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>
@quantum-x
quantum-x merged commit 3c2864a into main Jul 3, 2026
10 checks passed
@quantum-x
quantum-x deleted the feat/dispatch-tag-release branch July 3, 2026 16:21
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