Skip to content

ci: replace manual release workflow with cargo-dist#128

Merged
lwshang merged 1 commit into
masterfrom
switch-to-cargo-dist
Jun 16, 2026
Merged

ci: replace manual release workflow with cargo-dist#128
lwshang merged 1 commit into
masterfrom
switch-to-cargo-dist

Conversation

@lwshang

@lwshang lwshang commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Why

The Release workflow fails on every run: it pinned actions/upload-artifact and actions/download-artifact at v3, which GitHub now automatically hard-fails. The workflow also targeted the retired ubuntu-20.04 runner.

Rather than patch the hand-rolled workflow, this adopts cargo-dist (v0.31.0), following the setup already in use in dfinity/ic-wasm.

What

  • dist-workspace.toml (new) — mirrors ic-wasm: ci = "github", shell installer, install-updater = true, and a [dist.github-action-commits] block that pins all generated uses: lines to full commit SHAs (matches our security policy).
  • Cargo.toml — adds the repository field (required by dist) and [profile.dist].
  • .github/workflows/release.yml — regenerated by dist generate; replaces the manual plan/build/test/publish jobs.

Target platforms

Built on native runners (so system OpenSSL is available — no cross-compile/vendoring):

Target Runner
x86_64-unknown-linux-gnu ubuntu-22.04
aarch64-unknown-linux-gnu ubuntu-22.04-arm
x86_64-apple-darwin macos-15-intel
aarch64-apple-darwin macos-14

Behavioral changes

  • Release artifacts are now .tar.xz archives named by target triple, plus an install script + checksums (not the old bare ic-repl-linux64 / ic-repl-macos / ic-repl-arm32 binaries).
  • The 32-bit arm-unknown-linux-gnueabihf build is dropped, replaced by 64-bit aarch64. The [target.arm-unknown-linux-gnueabihf] openssl block in Cargo.toml is left in place (inert in CI, preserves local arm32 cross-builds).
  • Triggers on semver-style tags (**[0-9]+.[0-9]+.[0-9]+*); the existing 0.7.8-style convention still matches. Runs a no-publish dist plan on PRs.

Verification

  • dist generate --check passes (exit 0) — the committed release.yml is byte-identical to dist 0.31.0's output, so it won't drift.
  • dist plan resolves the matrix above; all targets are native builds.

🤖 Generated with Claude Code

The manual release.yml pinned actions/upload-artifact and
download-artifact at v3, which GitHub now hard-fails. Rather than
just bumping the actions, adopt cargo-dist (v0.31.0) following the
setup already used in dfinity/ic-wasm.

- Add dist-workspace.toml mirroring ic-wasm: github CI backend, shell
  installer, install-updater, and SHA-pinned GitHub Actions.
- Build for x86_64/aarch64 Linux (glibc) and x86_64/aarch64 macOS,
  all on native runners (system OpenSSL, no cross-compile). Replaces
  the old linux64/macos/arm32 set; the 32-bit arm target is dropped.
- Add repository field and [profile.dist] to Cargo.toml.
- release.yml is now generated by `dist generate` (verified byte-for-
  byte with `dist generate --check`).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lwshang lwshang merged commit f93f609 into master Jun 16, 2026
12 checks passed
@lwshang lwshang deleted the switch-to-cargo-dist branch June 16, 2026 18:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the repo’s hand-rolled GitHub Actions release workflow with a cargo-dist–generated workflow to fix failures caused by deprecated Action versions and runner retirement, and to standardize release artifact generation.

Changes:

  • Add dist-workspace.toml to configure cargo-dist (including pinning GitHub Actions uses: to commit SHAs).
  • Update Cargo.toml with the repository field required by cargo-dist and add a [profile.dist].
  • Regenerate .github/workflows/release.yml via dist generate, replacing the prior manual build/test/publish jobs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
dist-workspace.toml Introduces cargo-dist workspace configuration and pins GitHub Actions to commit SHAs.
Cargo.toml Adds repository metadata and a dist-specific release profile.
.github/workflows/release.yml Replaces the manual release workflow with the cargo-dist–generated plan/build/host pipeline.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants