mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
32 lines
797 B
YAML
32 lines
797 B
YAML
name: publish-wasm
|
|
|
|
permissions:
|
|
pull-requests: write
|
|
contents: write
|
|
|
|
on: workflow_dispatch
|
|
|
|
jobs:
|
|
publish-wasm:
|
|
name: publish
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
# Setup .npmrc file to publish to npm
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '20.x'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
- name: Install wasm-pack
|
|
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|
- name: Build
|
|
run: wasm-pack build --target nodejs -r
|
|
- name: Publish
|
|
run: wasm-pack publish --target nodejs
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
|
|