fix: resolve release workflow wasm artifact lookup across runs#438
Merged
Conversation
The release.yml tried to download wasm-<version> from gen-release-pr.yml by finding the latest successful run, but after the release-prep PR merges, gen-release-pr.yml skips all steps (detecting the release commit) and uploads no artifact. Fix: search all artifacts across all workflow runs via the GitHub API for the uniquely-named wasm-<version> artifact, then download from the exact run that produced it. Also pin the download in gen-release-pr.yml to the specific triggering Build run via run_id to avoid race conditions.
Contributor
Release Assistant - PassedNo version-worthy changes detected. Only non-functional, doc, or test changes. |
1 similar comment
Contributor
Release Assistant - PassedNo version-worthy changes detected. Only non-functional, doc, or test changes. |
--paginate with --jq applies the query per-page, not to the merged result. Use per_page=100 (max) to get all artifacts in one request instead.
Merged
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.
Problem
The release workflow (
release.yml) failed to download the wasm artifact because it searched forwasm-<version>in the latest successful run ofgen-release-pr.yml. After the release-prep PR merges,gen-release-pr.ymldetects the release commit and skips all steps — including uploading the artifact.If other PRs merge between the release-prep PR creation and its merge,
HEAD~1-based approaches also break.Solution
Use the GitHub API (
gh api /repos/.../actions/artifacts) to search all artifacts across all workflow runs for the uniquely-namedwasm-<version>artifact, then download from the exact run that produced it. The artifact name includes the version, making it a unique identifier regardless of intervening runs.Also pinned the wasm download in
gen-release-pr.ymlto the specific triggering Build run viarun_idto avoid race conditions.Changes
dawidd6/action-download-artifactwithworkflowfilter + GitHub API search for the artifact by name across all runs. Addactions: readpermission.run_id: ${{ github.event.workflow_run.id }}.