Skip to content

release.yml: Support backfilling assets via workflow_dispatch - #18

Merged
d3mocide merged 3 commits into
mainfrom
claude/webflasher-github-actions-debug-vvyiu8
Sep 4, 2026
Merged

d3mocide merged 3 commits into
mainfrom
claude/webflasher-github-actions-debug-vvyiu8

Conversation

@d3mocide

@d3mocide d3mocide commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

Extend the release workflow to support manual re-runs against existing release tags, enabling asset backfill when workflow changes add new build artifacts after a release ships. Previously, releases could only be triggered by pushing a new tag; now they can be manually dispatched against any existing tag via the Actions UI.

Key Changes

  • Added workflow_dispatch input: New tag input parameter allows specifying an existing release tag (e.g., v1.0.0) when manually triggering the workflow
  • Tag resolution logic: New "Resolve target release tag" step determines whether to use the dispatched tag input or the pushed tag from GITHUB_REF_NAME
  • Enhanced version verification: Updated the "Verify version.h matches the target release tag" step to:
    • Use the resolved target tag instead of always using GITHUB_REF_NAME
    • Clarify error messaging that the checked-out ref must build the same firmware the tag represents
    • Add explanatory comment that this verification is the only safeguard preventing wrong binaries on an existing release when using workflow_dispatch
  • Updated asset naming: Changed all binary file references from ${GITHUB_REF_NAME} to ${{ steps.tag.outputs.value }} for consistency with the resolved tag
  • Release creation refinements:
    • Explicitly set tag_name to the resolved tag (required for workflow_dispatch to target the correct release)
    • Conditionally disable generate_release_notes for workflow_dispatch runs to prevent overwriting existing release notes with the dispatch branch's commit history
    • Conditionally set draft: false only for tag-push triggers; dispatch runs attach to existing releases as-is

Implementation Details

The workflow now supports two trigger paths:

  1. Tag push (existing): Builds and publishes a new release from the pushed tag
  2. Manual dispatch (new): Builds against a specified existing tag and attaches assets to that release

The version.h verification step serves dual purposes: it ensures release correctness for tag-push triggers AND prevents accidental asset mismatches when dispatching against the wrong tag or branch. This is critical because workflow_dispatch checks out the dispatch branch (typically main), not the tagged commit itself.

Release notes are only auto-generated for tag-push triggers; dispatch runs preserve the original release notes and only add missing asset files.

https://claude.ai/code/session_01LJFxsP371u76Ci5y2Wpf7U

A manual workflow_dispatch re-run (added in a567c26 to backfill v1.0.0's
missing bootloader/partitions/boot_app0 assets) must target the vX.Y.Z
tag via the ref dropdown. Left on the default branch, GITHUB_REF_NAME is
a branch name like "main" and the existing check failed with a
misleading "bump version.h to match" message — that's exactly what
happened re-running against v1.0.0 (dispatched against main by mistake).
Now it calls out the wrong-ref mistake directly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJFxsP371u76Ci5y2Wpf7U
GitHub only allows workflow_dispatch against a ref whose own copy of the
workflow file already defines the trigger — a tag cut before this
trigger existed (v1.0.0) can never be dispatched against directly.
Confirmed today trying exactly that: "Workflow does not have
'workflow_dispatch' trigger". The previous design assumed picking the
tag from the ref dropdown would work; it doesn't and never could.

Now workflow_dispatch takes an explicit `tag` input naming the release
to attach built assets to, and always runs from a branch (main). Safe
because "Verify version.h" still checks the checked-out source actually
matches that tag's version before building or uploading anything — src/
is unchanged since v1.0.0 was cut, so building from main's tip produces
the same firmware.

Also scopes generate_release_notes off for the dispatch path: the
action would otherwise regenerate v1.0.0's release notes from this run's
own commit, silently pulling in every commit landed since instead of
just backfilling the missing bootloader/partitions/boot_app0 assets.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJFxsP371u76Ci5y2Wpf7U
The stored file is the fixed name firmware.bin (copy_track() keeps it
generic so manifest.json's part paths don't change between versions),
and the <a download> links had no filename hint, so the browser was
suggesting "firmware.bin" for every download regardless of which build
it came from. Sets an explicit download="LoRaTraceRX-<version>.bin" per
track instead of renaming the stored file.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJFxsP371u76Ci5y2Wpf7U
@d3mocide
d3mocide merged commit b7c30c2 into main Sep 4, 2026
1 of 2 checks passed

This branch had an error being deployed

1 failed deployment
github-pages — 8d8e0954 Deployed Sep 3, 2026 by d3mocide via deploy #5
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