Repository navigation
Release precompiled NIFs from GitHub with committed checksum file; drop Hex publishing - #3
Merged
Merged
Conversation
The package is consumed by Blockscout as a git dependency, so Hex
publishing is removed (hex.yml deleted). For a git dependency,
rustler_precompiled needs checksum-Elixir.ExEthBls.Native.exs in the
repository itself, so the file is no longer gitignored and the release
workflow now:
- is run manually from the Actions tab on main (workflow_dispatch) and
reads the version from mix.exs, failing if tag vX.Y.Z already exists;
- builds all 20 NIF archives as before;
- computes the checksum file from the archives with sha256sum (same
format `mix rustler_precompiled.download --all` writes) and commits it
to main;
- creates the GitHub release and tag vX.Y.Z at that checksum commit, so
`{:ex_eth_bls, github: "blockscout/ex_eth_bls", tag: "vX.Y.Z"}`
resolves to a commit whose checksum file matches the release assets;
- checks out the new tag and compiles and tests it without
EX_ETH_BLS_BUILD and without Rust, i.e. the consumer path.
README now documents the GitHub dependency and this release procedure.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
vbaranov
force-pushed
the
github-only-release
branch
from
October 19, 2026 19:24
fe89385 to
d10e68e
Compare
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.
The package is consumed by Blockscout as a git dependency, so Hex publishing is dropped and the release pipeline is reworked for GitHub-only distribution.
Problem
A git dependency on a release tag fails with
the precompiled NIF file does not exist in the checksum filebecausechecksum-Elixir.ExEthBls.Native.exswas gitignored and only ever meant for the Hex tarball.rustler_precompiledneeds that file next tomix.exsto verify the NIF it downloads from the GitHub release.The file can only be computed from the built archives, so it cannot simply be committed before tagging. The tag has to be created after the checksum file is committed.
Changes
hex.ymldeleted. No Hex publishing.checksum-*.exsis no longer gitignored. It is committed by the release workflow (see below).release.ymlreworked into a single manual run (workflow_dispatchonmain):prepare: readsversionfrommix.exs, refuses to run offmain, and fails if tagvX.Y.Zalready exists.build_release: the unchanged 2 × 10 matrix, with the version taken frommix.exsinstead of the tag.publish: downloads the archives, writeschecksum-Elixir.ExEthBls.Native.exswithsha256sum(same formatmix rustler_precompiled.download --allproduces; verified locally that Elixir evaluates it to a 20-entry map), checks it has all 20 entries for the right version, commits it tomain, then creates the GitHub release withtag_name: vX.Y.Zandtarget_commitishset to that commit. The tag therefore contains the checksum file matching the attached archives.verify: checks out the new tag and runsmix compile --warnings-as-errorsandmix testwithoutEX_ETH_BLS_BUILDand without Rust, so the release is exercised exactly the way consumers compile it.{:ex_eth_bls, github: "blockscout/ex_eth_bls", tag: "v0.1.2"}, and the Releasing section documents the new procedure (bump version, merge, run the workflow; never push tags or create releases by hand).mainhas no branch protection or rulesets and the default workflow token permission iswrite, so thecontents: writejob can push the checksum commit.actionlintpasses.After merging
main. It createsv0.1.2with all archives and the committed checksum file.apps/indexer/mix.exsto{:ex_eth_bls, github: "blockscout/ex_eth_bls", tag: "v0.1.2"}and runmix deps.get.Earlier tags were created before this change, so their commits have no checksum file and cannot be used as a git dependency without
EX_ETH_BLS_BUILD.🤖 Generated with Claude Code