Repository navigation
Publishes to Hex from CI on a tag push - #686
Merged
Merged
Conversation
A new workflow, .github/workflows/release.yml, publishes this package to Hex when a v*.*.* tag is pushed, and only when the tagged commit is on the default branch (named by the push event, never written in the file), the tag names @Version in mix.exs at that commit, Hex does not already show that version, and the full gate (gate.full from .claude/wurk.json) is green there. The toolchain-to-gate steps are copied byte for byte from ci.yml's gate job, Node included; the headless job is not copied. The publish step alone sees the HEX_API_KEY secret; the docs publish with the package. CLAUDE.md's release-prep row, relay paragraph and Release preps paragraph, and the closing section of .claude/wurk/release.md, now say an agent or a session never runs mix hex.publish: the release workflow publishes on the tag push, and a failed workflow is re-run from its Actions page, never worked round by a local publish. ADR-0019 records the decision at proposed; the index row moved cited README lines, so the ADR cites baseline is regenerated. Gate: full mix quality green on this staged tree (3,954 of 3,954 tests, 95.3% coverage, dialyzer clean, ADR cites green). Refs: sb-inp3
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.
What
Today the publish is the one release step a person runs by hand; the version bump, the changelog promotion and the tag are already the automation's. This adds
.github/workflows/release.yml, which publishesstatifier_blocksto Hex when a version tag is pushed, and only when the tagged commit passes every check below. The move to tag-push publishing was ruled by the operator, 2026-10-04.v*.*.*, and nothing else (no branch push, no pull request, noworkflow_dispatch).permissions: contents: read; one job;concurrencykeyed by the tag ref withcancel-in-progress: false.github.event.repository.default_branch, passed throughenv:); the run stops unless the tagged commit is an ancestor of that branch's head (git merge-base --is-ancestor), unless the tag without itsvequals@versioninmix.exsat the tagged commit, and when Hex already shows that version or does not answer.ci.yml'sgatejob, copied byte for byte (Node andactions/setup-node@v4included), so the gate isgate.fullread from.claude/wurk.json(todaymix quality) exactly as CI runs it. A red gate publishes nothing. Theheadlessjob is not copied: it proves an optional-dependency tree, is not part of the gate, andci.ymlruns it on every push to the default branch.mix hex.publish --yes, docs with the package, withHEX_API_KEYfrom${{ secrets.HEX_API_KEY }}in that one step'senv:and nowhere else; then the hex.pm and HexDocs addresses of the version are printed.CLAUDE.md's release-prep row (its "always for the publish" clause), its relay paragraph's last clause and its Release preps paragraph's publish sentence, and the closing publish sentence of.claude/wurk/release.md, now say in the operator's words: an agent or a session never runsmix hex.publish; the release workflow publishes on the tag push the release-prep row already allows; a failed workflow is re-run from its Actions page, never worked round by a local publish. The relay sentence that publishing or cutting a release stays forbidden however consent arrives is unchanged: it is still true.ADR-0019 records the decision at proposed. It stays proposed until the workflow has published a version.
Provenance
mix.exsat the tag, the toolchain copied fromci.ymlrather than shared, and no manual dispatch: decided by the conductor under a standing consent, 2026-10-03.mix help hex.publish("Reverting a package") says a new version of an existing package can be reverted or updated within one hour, and after that a version can only be retired (mix help hex.retire). The record states the latter.docs/adr/.cite-baseline.jsonis regenerated bymix adr.cites --update: the new index row indocs/adr/README.mdmoves the README lines ADR-0005 cites by number, the same shape as earlier index-row additions on main. No record text is removed.changelog.d/README.mdexcludes documentation, ADRs, and CI or agent tooling changes.Checks
mix qualitygreen on the committed tree: 3,954 of 3,954 tests, 95.3% coverage, dialyzer clean, ADR cites green.run:script passesbash -n; the copied block is byte-identical to thegatejob's steps inci.yml, from the comment above "Read the toolchain out of mise.toml" to the end of "Full quality gate"; and the four check steps' scripts were run under bash in a scratch clone atv0.42.0with the step env set by hand: fetch, ancestry and version passed, the Hex check stopped with "already on Hex"; a mismatched tag name stopped the version check; an extra commit offmainstopped the ancestry check. No step from the toolchain on, and no publish, has executed.lib/changes; no version bump; no tag.Direction check of the record
Every claim in ADR-0019 was checked against main at
9874eadand against the workflow in this request: the trigger, permissions, concurrency, the order of the checks, the copied block and the publish step matchrelease.ymlby step name;ci.yml's "Full quality gate" step and thegatejob's steps match the cited range; the release-prep row, relay paragraph and Release preps paragraph matchCLAUDE.mdas this request leaves them; the Hex replace and revert window matchesmix help hex.publish, and retirement matchesmix help hex.retire. Cites into this repository are by anchor with the SHA they were read at; the workflow, which is only on this branch, is cited by step name alone.git diff origin/main -- docs/adr/removes no line of any record; the only removed lines are the regenerated entries of.cite-baseline.json.Out of this request:
changelog.d/README.md's "At release" section still says the publish is the operator's; it is corrected separately.