Repository navigation
Release from CI with Workload Identity - #245
Merged
Merged
Conversation
Pushing a v* tag runs the new Release workflow in the release environment. It installs Hex 2.6.0-dev from a pinned hexpm/hex commit, checks that the tag matches the version in src/hex_core.app.src and takes the version's CHANGELOG section as the release notes. It then publishes the package and docs with mix hex.publish, which exchanges the job's OIDC token for a token that can only publish hex_core, and creates the GitHub release. publish.exs is the Mix project mix hex.publish needs. It reads the version and metadata from src/hex_core.app.src, lists rebar3 as the build tool and builds the docs with rebar3 ex_doc. It isn't named mix.exs because Mix would then build a git dependency on hex_core with Mix instead of rebar3, and Mix can't compile hex_core.
ericmj
force-pushed
the
release-workflow
branch
from
October 19, 2026 21:10
67e24fc to
13933fb
Compare
This was referenced Oct 19, 2026
3.27.3 is the latest rebar3 release. Its escript is built with OTP 27, so the OTP 24, 25 and 26 jobs keep their rebar3 versions.
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.
Pushing a
v*tag runs the new Release workflow in thereleaseenvironment. It installs Hex 2.6.0-dev from a pinned hexpm/hex commit, checks that the tag matches the version insrc/hex_core.app.srcand takes the version's CHANGELOG section as the release notes. It then publishes the package and docs withmix hex.publish, which exchanges the job's OIDC token for a token that can only publishhex_core, and creates the GitHub release with the notes. The GitHub release is created after the publish, so a failed publish doesn't leave a release for a version that isn't on Hex.publish.exsis the Mix projectmix hex.publishneeds, used withMIX_EXS=publish.exs. It reads the version and metadata fromsrc/hex_core.app.src, lists rebar3 as the build tool and builds the docs withrebar3 ex_doc, so the package has the same metadata and files as the onesrebar3 hex publishbuilt. It isn't namedmix.exsbecause Mix would then build a git dependency onhex_corewith Mix instead of rebar3, and Mix can't compilehex_core.Before the first tag, hex.pm needs https://github.com/hexpm/hexpm-ops/pull/560 and hexpm/hexpm#2064 deployed, and a workload identity on the
hexorganization, which ownshex_core. The identity has the write role, trustshexpm/hex_corewith workflowrelease.ymland environmentrelease, covers the public packagehex_coreand doesn't cover private packages. This repository'sreleaseenvironment only allowsv*tags.The release workflow uses rebar3 3.27.3, the latest release, and so do the OTP 27, 28 and master test jobs. Its escript is built with OTP 27, so the OTP 24, 25 and 26 jobs keep their rebar3 versions.