mix metamorphic_crypto.release (metamorphic_crypto v0.2.2)

Copy Markdown View Source

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

  1. Verifies the working tree is clean.
  2. Verifies a git tag v<version> exists for the current mix.exs version.
  3. Verifies the GitHub Release for that tag exists and carries the precompiled NIF assets (built by .github/workflows/release.yml).
  4. Runs mix rustler_precompiled.download MetamorphicCrypto.Native --all to regenerate checksum-Elixir.MetamorphicCrypto.Native.exs against those published assets.
  5. Stops so you can commit the regenerated checksum file.
  6. After you re-run with --publish, re-verifies the preconditions and prints the mix hex.publish command for you to run (Hex publish is interactive and uses your local HEX_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 command

Options

  • --publish — verify all release preconditions and print the final mix hex.publish command to run. Without it, the task stops after regenerating checksums so you can review and commit them.
  • --yes — include --yes in the printed mix hex.publish command (skips Hex's confirmation prompt).