Skip to content

Release precompiled NIFs from GitHub with committed checksum file; drop Hex publishing - #3

Merged
vbaranov merged 2 commits into
mainfrom
github-only-release
Oct 19, 2026
Merged

vbaranov merged 2 commits into
mainfrom
github-only-release

Conversation

@vbaranov

@vbaranov vbaranov commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

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 file because checksum-Elixir.ExEthBls.Native.exs was gitignored and only ever meant for the Hex tarball. rustler_precompiled needs that file next to mix.exs to 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.yml deleted. No Hex publishing.
  • checksum-*.exs is no longer gitignored. It is committed by the release workflow (see below).
  • release.yml reworked into a single manual run (workflow_dispatch on main):
    1. prepare: reads version from mix.exs, refuses to run off main, and fails if tag vX.Y.Z already exists.
    2. build_release: the unchanged 2 × 10 matrix, with the version taken from mix.exs instead of the tag.
    3. publish: downloads the archives, writes checksum-Elixir.ExEthBls.Native.exs with sha256sum (same format mix rustler_precompiled.download --all produces; verified locally that Elixir evaluates it to a 20-entry map), checks it has all 20 entries for the right version, commits it to main, then creates the GitHub release with tag_name: vX.Y.Z and target_commitish set to that commit. The tag therefore contains the checksum file matching the attached archives.
    4. verify: checks out the new tag and runs mix compile --warnings-as-errors and mix test without EX_ETH_BLS_BUILD and without Rust, so the release is exercised exactly the way consumers compile it.
  • README: Installation now shows {: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).
  • main has no branch protection or rulesets and the default workflow token permission is write, so the contents: write job can push the checksum commit. actionlint passes.

After merging

  1. Run Build precompiled NIFs from the Actions tab on main. It creates v0.1.2 with all archives and the committed checksum file.
  2. In Blockscout, set apps/indexer/mix.exs to {:ex_eth_bls, github: "blockscout/ex_eth_bls", tag: "v0.1.2"} and run mix 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

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
vbaranov force-pushed the github-only-release branch from fe89385 to d10e68e Compare October 19, 2026 19:24
@vbaranov
vbaranov merged commit 310a126 into main Oct 19, 2026
2 checks passed
@vbaranov
vbaranov deleted the github-only-release branch October 19, 2026 19:31
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.

1 participant