Publishes metamorphic_crypto to Hex from your machine, in the correct order
for a precompiled-NIF package.
$ mix metamorphic_crypto.release
Hex has no OIDC/trusted-publishing, so this is intentionally a local,
one-command flow rather than CI automation: your HEX_API_KEY never has to
live in GitHub secrets. The command refuses to publish unless every
precondition is met.
What it does
- Verifies the working tree is clean.
- Verifies a git tag
v<version>exists for the currentmix.exsversion. - Verifies the GitHub Release for that tag exists and carries the
precompiled NIF assets (built by
.github/workflows/release.yml). - Runs
mix rustler_precompiled.download MetamorphicCrypto.Native --allto regeneratechecksum-Elixir.MetamorphicCrypto.Native.exsagainst those published assets. - Stops so you can commit the regenerated checksum file.
- After you re-run with
--publish, re-verifies the preconditions and prints themix hex.publishcommand for you to run (Hex publish is interactive and uses your localHEX_API_KEY).
Typical sequence
# 1. bump @version in mix.exs, update CHANGELOG.md, commit
# 2. git tag vX.Y.Z && git push origin main --tags
# 3. wait for the "Build Precompiled NIFs" workflow to finish
$ mix metamorphic_crypto.release # regenerates checksums
$ git add checksum-*.exs && git commit -m "Update NIF checksums for vX.Y.Z" && git push
$ mix metamorphic_crypto.release --publish # verifies, then prints the publish commandOptions
--publish— verify all release preconditions and print the finalmix hex.publishcommand to run. Without it, the task stops after regenerating checksums so you can review and commit them.--yes— include--yesin the printedmix hex.publishcommand (skips Hex's confirmation prompt).