Repository navigation
ci(release): attach the binaries as the Release is published - #250
Merged
Merged
Conversation
Published Releases are immutable, so on-release.yml could no longer upload the binaries afterwards: v2.1.0 and v2.2.0 both failed with "HTTP 422: Cannot upload assets to an immutable release" and shipped without downloads. release-settle now builds both binaries before publishing and hands them to release-publish as asset_files. on-release downloads them from the Release for the registry upload, so both carry the same bytes and a slow environment approval no longer outlives a one-day workflow artifact. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Claude review status
✅ Review clean Last reviewed: New this round: 0 finding(s), 0 question(s) · Resolved this round: 0 · Open questions: 0 |
A versioned dispatch from main runs the build job in main's cache scope while it compiles the routed commit, which CodeQL reports as cache poisoning. Set cache-mode: none on the job and turn Foundry's cache off, as megaeth-labs/mega-evm#425 does, so that commit's build scripts cannot write caches that later runs restore. Also say in the dispatch input that a version settles, not only refreshes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Troublor
approved these changes
Nov 27, 2026
RealiCZ
approved these changes
Nov 27, 2026
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
Published Releases in this repository are immutable, so
on-release.ymlcan no longer attach files after publication.v2.1.0 and v2.2.0 both failed with
HTTP 422: Cannot upload assets to an immutable releaseand shipped without downloads.This opts into the
asset_filesinput added by megaeth-labs/.github#59, following megaeth-labs/mega-evm#425.release-settle.yml: a newbuildjob builds both binaries from the commit being published and checks their--version.It has
contents: readonly, with no environment, secrets or app token.publishneeds it and passes the files torelease-publish, which attaches them andSHA256SUMSbefore publishing.A failed build publishes nothing, and a re-run builds again before publish resumes.
buildjob has no Actions cache access (cache-mode: none, and Foundry's own cache off).A versioned dispatch from
mainruns it inmain's cache scope, so the routed commit's build scripts must not be able to write caches that later runs restore.on-release.yml: thebuildandassetsjobs are removed.registrydownloads the binaries from the Release, verifiesSHA256SUMS, and uploads them, so the Release page and the registry carry the same bytes.on-release.ymlkept its build artifact for 1 day, so a later approval fails atdownload-artifact: v2.1.0 failed that way, and the artifact of v2.2.0's first run expired whileregistrywas still waiting.registrynow reads from the Release, and the new artifact inrelease-settle.ymlis kept 30 days to cover the wait for the reviewer.release-settle.ymldispatch input now reads "Version to settle", since a versioned dispatch can publish.Differences from megaeth-labs/mega-evm#425
registryuploads the Release's own files instead of building them again, which that PR left as a follow-up.Older tags are unaffected: a
releaseevent or tag rehearsal runs the workflow from that tag's tree.stateless-validatoranddebug-trace-server, as in v2.0.20 and earlier, without a target triple.CodeQL
The
actions/cache-poisoning/poisonable-stepalert on the build step (#19) is dismissed as a false positive: the query does not modelcache-mode.mega-evm dismissed its equivalent alert the same way.
Notes
mainafter the merge.v2.1.0 and v2.2.0 stay without downloads.
on-release.ymlrehearsal now needs a tag whose Release carries the binaries.Testing
no assets to download, as expected).cargo buildcommand and version checks passed onubuntu-24.04in both attempts of v2.2.0'sOn Releaserun.main, and its build log readsCache mode: none.app-token-lintpasses in CI, andcodespellandcargo fmt --all --checkpass locally.Clippy and
cargo sortwere not run locally: no Rust or manifest changed.actionlintwas not run.🤖 Generated with Claude Code