Repository navigation
release: publish to Hex when the checksum PR merges - #86
Merged
Merged
Conversation
…keyed on CI The Hex publish job compiles the docs on a runner with CI=true. With the config, that compile built whisper.cpp from source. With the variable, only ci.yml and integration.yml build from source, and the publish job downloads the precompiled NIF and checks it against the checksum file.
# Conflicts: # .github/workflows/ci.yml # .github/workflows/integration.yml
This was referenced Nov 12, 2026
Merged
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.
Before
AGENTS.mdends the release with a manual step:No agent has a Hex credential, so every release waits for a person who runs
mix hex.publishfrom the right tree.Problem
A release stops at that manual step, and nothing checks that the published tree carries the checksums of the release's tarballs.
After
The merge of the checksum PR publishes, like rubas/cloaked_req#89. The workflow keeps no Hex key: Hex trades the job's GitHub OIDC token for a short token that can only publish
whisper_cpp.The publish job:
mainthat changeschecksum-Elixir.WhisperCpp.Native.exsfor a version that already has its tag,SHA256SUMS, and stops when they differ, because a Hex version is immutable,mix hex.publish --yesin the GitHub environmenthex, which onlymaincan use. Staged publishing holds the release until an owner approves it on hex.pm.Setup, design, and checks
Setup outside the repo:
hexexists onrubas/whisper_cpp, with a deployment branch policy ofmainonly.rubas, repositorywhisper_cpp, workflowrelease.yml, environmenthex.Design:
release.yml:detectsetsshould_publishfromgit diff --name-only "$BEFORE" "$GITHUB_SHA". Aworkflow_dispatchnever publishes.--wait, as in release: publish to Hex when the checksum PR merges cloaked_req#89: with staged publishing it blocks until the approval, up to 7 days, and a hosted job stops after 6 hours.AGENTS.mdsays to read the end of the log, because a failed docs upload leaves the job green.config/config.exsforced a source build wheneverCI=true. The publish job runs on a runner withCI=true, so its docs compile would have built whisper.cpp from source and needed Rust and cmake. We drop the config, andci.ymlandintegration.ymlsetWHISPER_CPP_BUILD=1instead, whichWhisperCpp.Nativealready reads. The publish job now downloads the precompiled x86_64 NIF and checks it against the checksum file, a second check of the file. Users never saw the config: Mix does not load the config of a dependency.Checks:
--persona=pedanticpasses.v0.5.0and the checksum file onmainprints no difference, and it fails for a changed file.mix hex.publish --dry-run --yeson this branch, withoutCI, downloads the precompiled NIF, builds the docs, and builds the package.