Skip to content

fix: update release-plz and skip publish verification for wasm32#1532

Open
r-near wants to merge 3 commits into
masterfrom
fix/update-release-plz
Open

fix: update release-plz and skip publish verification for wasm32#1532
r-near wants to merge 3 commits into
masterfrom
fix/update-release-plz

Conversation

@r-near

@r-near r-near commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Update release-plz action from pinned v0.3.151 to @0.5 (currently v0.3.157)
  • Add publish_no_verify = true to release-plz.toml and remove CARGO_BUILD_TARGET from the workflow

The v5.26.1 release failed due to a gix slotmap bug (fixed in v0.3.156) and couldn't recover on re-run because it didn't recognize already-published crates (fixed in v0.3.155). Updating was blocked because CARGO_BUILD_TARGET=wasm32-unknown-unknown caused cargo-binstall to try installing a wasm32 binary of release-plz. Skipping the publish verification build via config removes the need for the env var entirely.

The pinned v0.3.151 had two bugs that caused the release to fail:
- gix slotmap overflow when verifying crates.io index (fixed in v0.3.156)
- not recognizing already-published crates on re-run (fixed in v0.3.155)

Move CARGO_BUILD_TARGET into .cargo/config.toml so cargo-binstall
(used by newer action versions) doesn't try to install a wasm32 binary.
@r-near r-near requested a review from a team as a code owner April 9, 2026 21:47
Copilot AI review requested due to automatic review settings April 9, 2026 21:47
@github-project-automation github-project-automation Bot moved this to NEW❗ in DevTools Apr 9, 2026

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

Updates the release workflow to unblock GitHub releases/tags creation for v5.26.1 by upgrading the release-plz GitHub Action and adjusting how the Cargo build target is set so the action can install its native binary successfully.

Changes:

  • Switch release-plz/action from a pinned commit SHA to @0.5.
  • Move the wasm32 build target configuration from CARGO_BUILD_TARGET env to a generated .cargo/config.toml during the workflow run.

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


- name: Run release-plz
uses: release-plz/action@5ab144c9d67d4346240190d0f95ed08668677928
uses: release-plz/action@0.5

Copilot AI Apr 9, 2026

Copy link

Choose a reason for hiding this comment

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

release-plz/action@0.5 is a moving target (patch updates can change behavior) and also weakens supply-chain security compared to the previously pinned commit SHA. Consider pinning to an exact release (e.g., v0.5.x) or a commit SHA, and optionally keep a comment noting which version it corresponds to for easy upgrades.

Suggested change
uses: release-plz/action@0.5
uses: release-plz/action@v0.5.0

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/release-plz.yml Outdated
# but it ignores .cargo/config.toml, so this lets the action install release-plz
# natively while cargo still builds for wasm32.
- name: Set cargo build target
run: echo -e '[build]\ntarget = "wasm32-unknown-unknown"' >> .cargo/config.toml

Copilot AI Apr 9, 2026

Copy link

Choose a reason for hiding this comment

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

This step appends to .cargo/config.toml with >>, which can create multiple [build] sections if the file is ever added to the repo or if another step writes to it, leading to confusing Cargo config resolution. Prefer writing the file deterministically (overwrite/create) and use printf/heredoc instead of echo -e for better shell portability.

Suggested change
run: echo -e '[build]\ntarget = "wasm32-unknown-unknown"' >> .cargo/config.toml
run: |
mkdir -p .cargo
cat > .cargo/config.toml <<'EOF'
[build]
target = "wasm32-unknown-unknown"
EOF

Copilot uses AI. Check for mistakes.
r-near added 2 commits April 9, 2026 16:30
The composite action installs release-plz via cargo-binstall with
--force, inheriting CARGO_BUILD_TARGET=wasm32-unknown-unknown from
the step env. This causes it to try installing a wasm32 binary.

Install release-plz and cargo-semver-checks in a separate step
without the env var, then run release-plz commands directly with
CARGO_BUILD_TARGET set only for the execution steps.

Also fixes the dirty-tree issue where .cargo/config.toml created
at runtime would cause release-pr to fail.
Skip the cargo publish verification build (which requires wasm32)
via release-plz config. This removes the need for CARGO_BUILD_TARGET
in the workflow, which was causing cargo-binstall to try installing
a wasm32 binary of release-plz.
@r-near r-near changed the title fix: update release-plz action to unblock 5.26.1 release fix: update release-plz and skip publish verification for wasm32 Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: NEW❗

Development

Successfully merging this pull request may close these issues.

3 participants