fix(ci): trigger the plugin release on workflow_run, fix the Windows upload, link bundles in the notes#282
Merged
Merged
Conversation
…the notes v0.3.0 published with no plugin bundles attached. The workflow triggered on `release: published`, but GitHub refuses to start workflows from events created with the default GITHUB_TOKEN — and dist's `host` job creates the release with exactly that token, so the event never fired. The bundles had to be dispatched by hand. Tag push is not the alternative: it races dist and 404s on every upload for the ~8 minutes dist spends building. workflow_run fires on the Release workflow completing, by which point the release object exists, and `head_branch` carries the tag name. Guarded on a successful run from a tag push, since Release also runs on pull_request. Also appends a plugin download table to the release notes. dist writes the body and only knows what it built, so its table lists the standalone alone and the plugin zips sit in Assets with nothing pointing at them. Keyed on an HTML marker so re-dispatching does not stack up tables.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the plugin bundle release automation so plugin artifacts reliably build and attach after cargo-dist finishes publishing a GitHub Release, and improves the published release notes to clearly link plugin downloads alongside the standalone artifacts.
Changes:
- Switch
plugin-release.ymlfromrelease: publishedto aworkflow_runtrigger on the dist-generatedReleaseworkflow completion, with guards to only act on successful tag pushes. - Update tag resolution to use
workflow_run.head_branch(tag name) for automatic runs while keepingworkflow_dispatchas a manual fallback. - Append an idempotent plugin download table to the GitHub Release notes after bundle upload completes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The Windows bundle built and packaged fine but failed to upload with "release not found". The step had no explicit shell, so it ran under pwsh, where $RELEASE_TAG is not an env var reference — it expanded to an empty string and gh was asked to upload to a release named "". Introduced when the matrix gained Windows: shell: bash was added to the clean, verify and package steps but missed here. Every run step that reads a shell variable now names its shell explicitly.
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.
Three fixes to
plugin-release.yml, all surfaced by v0.3.0 being the first release since #271 added the workflow.1. The workflow never triggered
v0.3.0 published with no plugin bundles attached — there is no
Plugin Releaserun in the Actions history for that tag.It triggered on
release: published. GitHub deliberately refuses to start workflows from events created with the defaultGITHUB_TOKEN, as a guard against recursive runs — and dist'shostjob creates the release with exactly that token. So the event that was supposed to drive this workflow can never fire it.The original header comment was right that tag push races dist and 404s for the ~8 minutes dist spends building. That reasoning was sound; it just landed on a trigger that couldn't fire.
workflow_runavoids both: it fires whenReleasecompletes, so the release object exists, andhead_branchcarries the tag (verified against the real run:headBranch: v0.3.0). Guarded on a successful run from a tag push, sinceReleasealso runs onpull_request.2. The Windows bundle failed to upload
Regression from #280, which added Windows to the matrix. The Windows job built and packaged correctly, then died on upload:
No explicit shell meant pwsh, where
$RELEASE_TAGis not an env var reference — it expanded to empty and gh was asked to upload to a release named"".shell: bashwas added to the clean, verify and package steps but missed here.Every
runstep that reads a shell variable now names its shell explicitly; audited the whole job.Package (Windows)legitimately stays on pwsh and uses$env:.3. Release notes don't mention the plugin
dist writes the release body and only knows what it built, so its table lists the standalone alone. The plugin zips land in Assets with nothing pointing at them, reading as a standalone-only release.
A
notesjob appends a plugin download table with per-platform tested/untested status, keyed on an HTML comment marker so re-dispatching doesn't stack duplicates.State of v0.3.0
Both Linux bundles are attached (uploaded by a manual dispatch). Windows is missing pending this fix — a re-dispatch after merge will attach it;
--clobbermakes re-uploading the Linux ones harmless.Verification
The Windows shell fix and the notes job are provable on a re-dispatch. The
workflow_runtrigger is not — it only fires off a real tagged release, so its first genuine test is v0.4.0. Guard logic and tag extraction are verified against real event data;workflow_dispatchremains the fallback.