Skip to content

chore(release): set up cargo-release-oxc for publishing crates#9476

Merged
Boshen merged 4 commits into
mainfrom
chore/cargo-release-oxc-setup
May 22, 2026
Merged

chore(release): set up cargo-release-oxc for publishing crates#9476
Boshen merged 4 commits into
mainfrom
chore/cargo-release-oxc-setup

Conversation

@Boshen

@Boshen Boshen commented May 20, 2026

Copy link
Copy Markdown
Member

Closes #6900.

Summary

Wires up cargo-release-oxc so the existing release flow bumps Rust crates alongside the npm packages and a separate workflow publishes the crates to crates.io via trusted publishing.

One workflow input version drives both the npm bump (via just bump-packages) and the crate bump (via cargo release-oxc update --release crates --version $VERSION). Crates and npm stay in lockstep on a single version.

Files

  • oxc_release.toml — release set named crates, root_crate = "rolldown", versioned_files = ["Cargo.toml"]. The workspace Cargo.toml is enough for cargo-release-oxc to walk every publishable workspace member.
  • .github/workflows/prepare-release.yml — added:
    • oxc-project/setup-rust with tools: cargo-release-oxc.
    • cargo release-oxc update --release crates --version ${VERSION} after just bump-packages.
    • cargo check to refresh Cargo.lock.
    • Extended add-paths to include Cargo.toml, Cargo.lock, crates/**/Cargo.toml.
  • .github/workflows/release-crates.yml — new. Fires on push to main when crates/rolldown/Cargo.toml changes. Runs the publish job inside the crates GitHub Actions environment, uses rust-lang/crates-io-auth-action for OIDC trusted publishing, and runs cargo release-oxc publish --release crates. No changelog, no GitHub release (the npm workflow already creates the shared tag for the version).

Workspace cleanups

A few crates needed adjustments to fit cargo-release-oxc's assumption that every publishable workspace member is consumed via [workspace.dependencies]:

  • rolldown_filter_analyzer, rolldown_plugin_vite_css, rolldown_plugin_vite_css_post, rolldown_plugin_vite_html → flipped to publish = false. None of them are consumed in the workspace and none were ready to publish.

Dependency

Depends on oxc-project/cargo-release-oxc#237 — adds the --version override on update and tolerates a missing crates_v* tag when --version is given. (PR #236, the --changelog opt-in, is already merged.)

#237 needs to be merged and a new cargo-release-oxc released before the workflow can use it.

Before the first crates release

Trusted publishing on crates.io has already been registered for every publishable crate against rolldown/rolldown + release-crates.yml + crates environment.

The crates GitHub Actions environment must exist in repo settings (Settings → Environments → New environment → crates) so the OIDC subject claim matches what crates.io has registered.

@netlify

netlify Bot commented May 20, 2026

Copy link
Copy Markdown

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 21dd549
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6a10213d1363e40008f8a016

@Boshen Boshen marked this pull request as draft May 20, 2026 07:51

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0c2a50f001

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/prepare-release-crates.yml Outdated
@Boshen Boshen changed the title chore(release): set up cargo-release-oxc for publishing crates chore(release): wire cargo-release-oxc into prepare-release for crates May 20, 2026
@Boshen Boshen force-pushed the chore/cargo-release-oxc-setup branch from 062614d to c27d28e Compare May 22, 2026 03:55
@Boshen Boshen changed the title chore(release): wire cargo-release-oxc into prepare-release for crates chore(release): set up cargo-release-oxc for publishing crates May 22, 2026
Boshen and others added 4 commits May 22, 2026 17:25
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pass `--version ${VERSION}` to `cargo release-oxc update` so the crate
bump uses the same version the npm bump uses, instead of being derived
independently from conventional commits + the latest `crates_v*` tag.
One input, one version across npm and crates.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
No workspace default-members is set, so `cargo check` at the workspace
root already checks every member.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The trusted-publishing config on crates.io is registered against this
environment; the OIDC subject must match for the token exchange to
succeed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Boshen Boshen force-pushed the chore/cargo-release-oxc-setup branch from 7ed8876 to 21dd549 Compare May 22, 2026 09:26
@Boshen Boshen marked this pull request as ready for review May 22, 2026 09:35
@Boshen Boshen merged commit cc36e49 into main May 22, 2026
31 checks passed
@Boshen Boshen deleted the chore/cargo-release-oxc-setup branch May 22, 2026 09:36
V1OL3TF0X pushed a commit to V1OL3TF0X/rolldown that referenced this pull request May 25, 2026
@shulaoda shulaoda mentioned this pull request May 27, 2026
shulaoda added a commit that referenced this pull request May 27, 2026
## [1.0.3] - 2026-05-27

### 🚀 Features

- transform: respect decorator strictNullChecks option (#9580) by @kylecannon
- drop `defer` keyword (#9503) by @TheAlexLichter

### 🐛 Bug Fixes

- ci: create target dir before cargo release-oxc update (#9584) by @shulaoda
- ci: reorder prepare-release steps to avoid dirty git check failure (#9583) by @shulaoda
- testing: canonicalize temp dir early and use platform-specific separator in test262 (#9582) by @shulaoda
- testing: resolve symlinked temp dir in test262 snapshot normalization (#9581) by @shulaoda
- testing: canonicalize temp dir path in test262 snapshot normalization (#9579) by @shulaoda
- dev: `onOutput` called twice when initial build fails (#9552) by @hyf0
- dev: make `ensureCurrentBuildFinish` not returning error when engine closes (#9564) by @h-a-n-a
- oxc-runtime: route require() to CJS helper variant (#9263) (#9526) by @IWANABETHATGUY
- generator: use exporter chunk's export mode for CJS default re-exports (#9299) (#9529) by @IWANABETHATGUY
- rolldown: always run reduced-atom static cycle check (#9441) (#9514) by @IWANABETHATGUY
- apply transform.dropLabels before scanning (#9521) (#9522) by @IWANABETHATGUY
- rolldown_watcher: take `rolldown` dep through the workspace (#9510) by @Boshen
- cache: keep the scan-stage cache consistent when a build fails (#9495) by @h-a-n-a
- skip JSON default-import namespace optimization for write targets (#9484) (#9489) by @IWANABETHATGUY
- deps: skip pnpm frozen-lockfile on Netlify to dodge catalog mismatch bug (#9471) by @Boshen

### 🚜 Refactor

- oxc-runtime: use Cow for helper path construction (#9538) by @IWANABETHATGUY
- fold import defer phase drop into PreProcessor (#9524) by @IWANABETHATGUY
- distinguish `map: null` vs `map: undefined` in transform hook output (#9497) by @sapphi-red

### 📚 Documentation

- explain the policy for Rust crates (#9547) by @sapphi-red
- cache: add design doc for cache (#9544) by @h-a-n-a
- guide/troubleshooting: add TDZ error section (#9537) by @sapphi-red
- dev-engine: add design doc for dev-engine (#9479) by @h-a-n-a
- lazy-barrel: tweak some words (#9483) by @shulaoda
- lazy-barrel: expand reasoning behind LARGE_BARREL_MODULES advice (#9477) by @shulaoda

### ⚡ Performance

- generate: thread ast_table by value into codegen consumer (#9555) by @Boshen
- finalizers: replace `_reExport` construction with a direct call to avoid calling `clone_in` (#9501) by @Dunqing
- reorder hot-path boolean checks to short-circuit on cheap predicates first (#9523) by @Boshen

### 🧪 Testing

- rolldown: regression fixture for #9401 (#9418) by @IWANABETHATGUY
- failing test for #9441 (#9504) by @TheAlexLichter

### ⚙️ Miscellaneous Tasks

- deps: upgrade oxc to 0.133.0 (#9563) by @Dunqing
- deps: update crate-ci/typos action to v1.46.3 (#9576) by @renovate[bot]
- deps: update mimalloc-safe to 0.1.62 (#9577) by @shulaoda
- mimalloc-safe: update to a bug-fix branch for verification (#9569) by @shulaoda
- deps: update test262 submodule for tests (#9551) by @rolldown-guard[bot]
- point published crates' readme to root README.md (#9553) by @Boshen
- replace actions-cool/issues-helper with gh CLI (#9543) by @Boshen
- deps: update cargo-shear to 1.12.4 (#9541) by @Boshen
- deps: update taiki-e/install-action action to v2.79.4 (#9535) by @renovate[bot]
- deps: update github actions (#9532) by @renovate[bot]
- deps: update rust crates (#9534) by @renovate[bot]
- deps: update npm packages (#9533) by @renovate[bot]
- gate experimental/testing-only items to silence dead_code in publish builds (#9517) by @Boshen
- docs: deploy to Void (#9509) by @Boshen
- release: set up cargo-release-oxc for publishing crates (#9476) by @Boshen
- rolldown_plugin_lazy_compilation: add missing description (#9507) by @Boshen
- mimalloc-safe: update to a bug-fix branch for verification (#9506) by @shulaoda
- deps: update crate-ci/typos action to v1.46.2 (#9468) by @renovate[bot]

### ❤️ New Contributors

* @kylecannon made their first contribution in [#9580](#9580)
shulaoda pushed a commit that referenced this pull request May 27, 2026
## [1.0.3] - 2026-05-27

### 🚀 Features

- transform: respect decorator strictNullChecks option (#9580) by @kylecannon
- drop `defer` keyword (#9503) by @TheAlexLichter

### 🐛 Bug Fixes

- ci: create target dir before cargo release-oxc update (#9584) by @shulaoda
- ci: reorder prepare-release steps to avoid dirty git check failure (#9583) by @shulaoda
- testing: canonicalize temp dir early and use platform-specific separator in test262 (#9582) by @shulaoda
- testing: resolve symlinked temp dir in test262 snapshot normalization (#9581) by @shulaoda
- testing: canonicalize temp dir path in test262 snapshot normalization (#9579) by @shulaoda
- dev: `onOutput` called twice when initial build fails (#9552) by @hyf0
- dev: make `ensureCurrentBuildFinish` not returning error when engine closes (#9564) by @h-a-n-a
- oxc-runtime: route require() to CJS helper variant (#9263) (#9526) by @IWANABETHATGUY
- generator: use exporter chunk's export mode for CJS default re-exports (#9299) (#9529) by @IWANABETHATGUY
- rolldown: always run reduced-atom static cycle check (#9441) (#9514) by @IWANABETHATGUY
- apply transform.dropLabels before scanning (#9521) (#9522) by @IWANABETHATGUY
- rolldown_watcher: take `rolldown` dep through the workspace (#9510) by @Boshen
- cache: keep the scan-stage cache consistent when a build fails (#9495) by @h-a-n-a
- skip JSON default-import namespace optimization for write targets (#9484) (#9489) by @IWANABETHATGUY
- deps: skip pnpm frozen-lockfile on Netlify to dodge catalog mismatch bug (#9471) by @Boshen

### 🚜 Refactor

- oxc-runtime: use Cow for helper path construction (#9538) by @IWANABETHATGUY
- fold import defer phase drop into PreProcessor (#9524) by @IWANABETHATGUY
- distinguish `map: null` vs `map: undefined` in transform hook output (#9497) by @sapphi-red

### 📚 Documentation

- explain the policy for Rust crates (#9547) by @sapphi-red
- cache: add design doc for cache (#9544) by @h-a-n-a
- guide/troubleshooting: add TDZ error section (#9537) by @sapphi-red
- dev-engine: add design doc for dev-engine (#9479) by @h-a-n-a
- lazy-barrel: tweak some words (#9483) by @shulaoda
- lazy-barrel: expand reasoning behind LARGE_BARREL_MODULES advice (#9477) by @shulaoda

### ⚡ Performance

- generate: thread ast_table by value into codegen consumer (#9555) by @Boshen
- finalizers: replace `_reExport` construction with a direct call to avoid calling `clone_in` (#9501) by @Dunqing
- reorder hot-path boolean checks to short-circuit on cheap predicates first (#9523) by @Boshen

### 🧪 Testing

- rolldown: regression fixture for #9401 (#9418) by @IWANABETHATGUY
- failing test for #9441 (#9504) by @TheAlexLichter

### ⚙️ Miscellaneous Tasks

- deps: upgrade oxc to 0.133.0 (#9563) by @Dunqing
- deps: update crate-ci/typos action to v1.46.3 (#9576) by @renovate[bot]
- deps: update mimalloc-safe to 0.1.62 (#9577) by @shulaoda
- mimalloc-safe: update to a bug-fix branch for verification (#9569) by @shulaoda
- deps: update test262 submodule for tests (#9551) by @rolldown-guard[bot]
- point published crates' readme to root README.md (#9553) by @Boshen
- replace actions-cool/issues-helper with gh CLI (#9543) by @Boshen
- deps: update cargo-shear to 1.12.4 (#9541) by @Boshen
- deps: update taiki-e/install-action action to v2.79.4 (#9535) by @renovate[bot]
- deps: update github actions (#9532) by @renovate[bot]
- deps: update rust crates (#9534) by @renovate[bot]
- deps: update npm packages (#9533) by @renovate[bot]
- gate experimental/testing-only items to silence dead_code in publish builds (#9517) by @Boshen
- docs: deploy to Void (#9509) by @Boshen
- release: set up cargo-release-oxc for publishing crates (#9476) by @Boshen
- rolldown_plugin_lazy_compilation: add missing description (#9507) by @Boshen
- mimalloc-safe: update to a bug-fix branch for verification (#9506) by @shulaoda
- deps: update crate-ci/typos action to v1.46.2 (#9468) by @renovate[bot]

### ❤️ New Contributors

* @kylecannon made their first contribution in [#9580](#9580)
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.

Publish rolldown to crates.io

1 participant