Skip to content

[ruff] Split WASM build and publish into separate workflows (#12387)#22476

Merged
MichaReiser merged 2 commits intoastral-sh:mainfrom
bybrooks:bybrooks/gh-12387-split-wasm-workflow
Jan 9, 2026
Merged

[ruff] Split WASM build and publish into separate workflows (#12387)#22476
MichaReiser merged 2 commits intoastral-sh:mainfrom
bybrooks:bybrooks/gh-12387-split-wasm-workflow

Conversation

@bybrooks
Copy link
Contributor

@bybrooks bybrooks commented Jan 9, 2026

Summary

Issue:#12387

This PR splits the WASM workflow into separate build and publish workflows, following the same pattern used for binaries (build-binaries.yml and release.yml).

Changes

New file: .github/workflows/build-wasm.yml

  • Triggers on workflow_call and pull_request
  • Builds WASM packages for three targets: web, bundler, nodejs (matrix strategy)
  • Uploads build artifacts via actions/upload-artifact

Modified: .github/workflows/publish-wasm.yml

  • Removed build steps (wasm-pack, rust toolchain setup, etc.)
  • Added actions/download-artifact to fetch pre-built artifacts
  • Kept existing npm publish logic (dry-run and production)

Modified: .github/workflows/release.yml

  • Added custom-build-wasm job that runs after plan
  • Updated build-global-artifacts to depend on custom-build-wasm

Test Plan

Automated Tests (triggered by this PR)

  • Build wasm workflow is triggered via pull_request
  • 3 matrix jobs (web, bundler, nodejs) run in parallel
  • Artifacts (artifacts-wasm-*) are uploaded for each target

Manual Verification (after merge)

  1. Run Release workflow via workflow_dispatch with dry-run tag
  2. Verify:
    • custom-build-wasm job runs after plan
    • build-global-artifacts waits for custom-build-wasm completion
    • custom-publish-wasm downloads artifacts and runs npm publish --dry-run
    • Job dependency chain works correctly

Local Validation (completed)

  • pre-commit run check-github-workflows -a - Passed
  • pre-commit run actionlint -a --hook-stage=manual - Passed
  • pre-commit run prettier -a - Passed

…h#12387)

- Create `build-wasm.yml` for building WASM artifacts
  - Triggers on `workflow_call` and `pull_request`
  - Builds for web, bundler, and nodejs targets using matrix
  - Uploads artifacts via `actions/upload-artifact`

- Modify `publish-wasm.yml` to only handle publishing
  - Remove build steps
  - Download pre-built artifacts via `actions/download-artifact`

- Update `release.yml` to call build-wasm before host job
  - Add `custom-build-wasm` job after plan
  - Update job dependencies accordingly

This follows the same pattern as build-binaries.yml and release.yml,
separating concerns and enabling artifact reuse.
@bybrooks bybrooks marked this pull request as ready for review January 9, 2026 12:27
@MichaReiser MichaReiser added the ci Related to internal CI tooling label Jan 9, 2026
@MichaReiser
Copy link
Member

This is great. It will make our release workflows much faster. Thank you

Hmm, I don't think that I can trigger the release workflow from your branch. Do you know if you can trigger it on your fork?

@MichaReiser
Copy link
Member

Let's give this a try

@MichaReiser MichaReiser merged commit baaf696 into astral-sh:main Jan 9, 2026
44 of 49 checks passed
@MichaReiser
Copy link
Member

Running https://github.com/astral-sh/ruff/actions/runs/20858802478

@MichaReiser
Copy link
Member

Looks like we'll only find out when doing our next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Related to internal CI tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants