Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/skills/bump-version-release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Releases are made by the org release pipeline (megaeth-labs/.github). Two decisi
3. **Publish** — merging the settle PR pushes to `release-vX.Y.Z`, which routes to `publish`. That job runs in the `release` environment and waits for its reviewer, then creates the annotated tag `vX.Y.Z` on the merge commit and publishes the GitHub Release with the settle PR's notes. The dispatch is not the approval; the merge plus the environment reviewer is.
4. **Targets** — automatic on the Release: `on-release.yml` uploads `mega-evme` to the MegaETH artifact registry, in the `release` environment.
crates.io publishing is paused while the OP crates are git-pinned (see the root `Cargo.toml`), so no crates are published.
Release assets are paused: Releases are immutable once published, so `on-release.yml` attaches nothing to them.
Publishing attaches `mega-evme` and `SHA256SUMS` to the Release through `release-settle.yml` and `release-publish`'s `asset_files`.
Rehearse `on-release.yml` first on an existing tag, dispatching on that tag's ref: `gh workflow run on-release.yml --ref vX.Y.Z -f dry_run=true`.
The tag being released is always the run's own ref; there is no separate tag input.
The publish credential, `GCP_AUTH_KEY`, lives in the `release` environment, whose deployment policy admits `main`, `release-v*` branches and `v*` tags.
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ name: On Release
# no crates are published. To resume once those crates are on crates.io,
# restore the `crates` job from PR #424.
#
# Release assets are paused as well. Releases here are immutable once
# published, and this workflow runs only after publishing, so attaching the
# binary to the Release fails (HTTP 422). The binary goes to the registry
# only until the release pipeline attaches assets before it publishes.
# `release-settle.yml` builds mega-evme and `release-publish` attaches it with
# SHA256SUMS (`asset_files`) before the Release is published, because Releases
# are immutable once published; this workflow keeps the registry upload.
#
# Rehearse on a tag ref (the job must run on a tag ref):
# gh workflow run on-release.yml --ref vX.Y.Z -f dry_run=true
Expand Down
51 changes: 50 additions & 1 deletion .github/workflows/release-settle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,51 @@
version_pattern: toml
changelog_file: CHANGELOG.md

publish:
# Releases are immutable once published, so the binary is built first, in a
# job with no credentials, and attached to the draft at publication.
build:
needs: route
if: needs.route.outputs.action == 'publish'
runs-on: ubuntu-24.04
timeout-minutes: 40
permissions:
contents: read
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ needs.route.outputs.commit }}
submodules: recursive
persist-credentials: false

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1
with:
cache: false

- uses: foundry-rs/foundry-toolchain@b00af27efadbc7b4ca8b82abbd903b17cc874d2a # v1

- name: Build mega-evme
run: cargo build --release --locked -p mega-evme

- id: version
Comment on lines +139 to +142
name: Derive the release version
env:
RELEASE_BRANCH: ${{ needs.route.outputs.release_branch }}
run: echo "version=${RELEASE_BRANCH#release-v}" >> "$GITHUB_OUTPUT"

- uses: megaeth-labs/.github/.github/actions/release-verify-version@main
with:
command: target/release/mega-evme --version
version: ${{ steps.version.outputs.version }}

- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: release-files
path: target/release/mega-evme
if-no-files-found: error

publish:
needs: [route, build]
if: needs.route.outputs.action == 'publish'
# One publish per release branch: the tag guard and the tag push are two
# steps, so a re-run must queue behind a run in flight, never overlap it.
concurrency:
Expand All @@ -141,6 +183,11 @@
fetch-depth: 0
persist-credentials: false

- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: release-files
path: release-files

- uses: megaeth-labs/.github/.github/actions/release-publish@main
with:
token: ${{ steps.release-token.outputs.token }}
Expand All @@ -151,3 +198,5 @@
version_file: Cargo.toml
version_pattern: toml
changelog_file: CHANGELOG.md
asset_files: |
release-files/mega-evme
Loading