-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
89c615f
commit e7c5bf1
Showing
2 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,21 +23,24 @@ jobs: | |
permissions: | ||
contents: read | ||
id-token: write | ||
strategy: | ||
matrix: | ||
target: [web, node, bundler, deno] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: "Install Rust toolchain" | ||
run: rustup target add wasm32-unknown-unknown | ||
- uses: jetli/[email protected] | ||
- uses: jetli/[email protected] | ||
- name: "Run wasm-pack build" | ||
run: wasm-pack build --target web --scope astral-sh crates/ruff_wasm | ||
run: wasm-pack build --target ${{ matrix.target }} crates/ruff_wasm | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
registry-url: "https://registry.npmjs.org" | ||
- name: "Rename generated package" | ||
run: | # Replace the package name w/ jq | ||
jq '.name="@astral-sh/ruff-api-web"' crates/ruff_wasm/pkg/package.json > /tmp/package.json | ||
jq '.name="@astral-sh/ruff-wasm-${{ matrix.target }}"' crates/ruff_wasm/pkg/package.json > /tmp/package.json | ||
mv /tmp/package.json crates/ruff_wasm/pkg | ||
- run: cp LICENSE crates/ruff_wasm/pkg # wasm-pack does not put the LICENSE file in the pkg | ||
- name: "Publish" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters