Automate checksum + Hex publish (manual-approval gated)#2
Merged
Conversation
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.
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.
Root-causes the recurring "git tag predates the checksum file" footgun by moving checksum generation and
mix hex.publishinto the release pipeline.What changes
Adds a
publishjob torelease.ymlthat runs after the GitHub release is created:checksum-Elixir.*.Native.exsfile from the just-released NIF artifacts viamix rustler_precompiled.download(canonical — format always matches what rustler_precompiled verifies at fetch time).mix hex.publish package --yes, then docs (best-effort).Safety gate
Bound to a new
hexGitHub Environment with a required reviewer (@jtippett). On everyv*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
hexenvironment:api(write) permission.gh secret set HEX_API_KEY --env hex --repo jtippett/ex_bashkit(paste the key).The
publishjob readsHEX_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.