Skip to content

Automate checksum + Hex publish (manual-approval gated)#2

Merged
jtippett merged 1 commit into
masterfrom
automate-hex-publish
Jun 20, 2026
Merged

Automate checksum + Hex publish (manual-approval gated)#2
jtippett merged 1 commit into
masterfrom
automate-hex-publish

Conversation

@jtippett

@jtippett jtippett commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Root-causes the recurring "git tag predates the checksum file" footgun by moving checksum generation and mix hex.publish into the release pipeline.

What changes

Adds a publish job to release.yml that runs after the GitHub release is created:

  1. Generates the checksum-Elixir.*.Native.exs file from the just-released NIF artifacts via mix rustler_precompiled.download (canonical — format always matches what rustler_precompiled verifies at fetch time).
  2. mix hex.publish package --yes, then docs (best-effort).

Safety gate

Bound to a new hex GitHub Environment with a required reviewer (@jtippett). On every v* tag, the pipeline builds NIFs → creates the GitHub release → pauses for your approval before publishing.

One manual setup step (required before first use)

Hex 2.x no longer mints API keys from the CLI (auth is OAuth now). Generate a key on the Hex.pm dashboard and store it scoped to the hex environment:

  1. https://hex.pm/dashboard/keys → generate a key with the api (write) permission.
  2. gh secret set HEX_API_KEY --env hex --repo jtippett/ex_bashkit (paste the key).

The publish job reads HEX_API_KEY (confirmed still honored by Hex 2.4.2).

New release flow

bump version → PR → merge → tag → push → approve the publish job. No checksum commit, no re-tag.

Mirrors the ex_monty setup: adds a manual-approval-gated 'publish' job to
release.yml that generates checksum-Elixir.ExBashkit.Native.exs from the
released NIF artifacts and runs 'mix hex.publish'. Gated by the 'hex'
GitHub Environment (required reviewer).

No more manual checksum commits or tag-after-checksum re-tagging.
@jtippett jtippett merged commit 2f352c7 into master Jun 20, 2026
1 check passed
@jtippett jtippett deleted the automate-hex-publish branch June 20, 2026 03:45
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