-
Notifications
You must be signed in to change notification settings - Fork 1.4k
29 lines (28 loc) · 931 Bytes
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Rust plugin
on:
workflow_dispatch:
jobs:
publish-rust-swc-plugin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
with:
toolchain: 1.65.0
target: wasm32-wasi
override: true
- name: Build SWC plugin
working-directory: ./packages/presets/swc-plugin
run: |
npm run build-wasm
- name: Publish SWC plugin
working-directory: ./packages/presets/swc-plugin
run: |
npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}