-
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (37 loc) · 1022 Bytes
/
npmpkg.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
30
31
32
33
34
35
36
37
name: Publish Package to npmjs
on:
push:
branches:
- master
- release/*
- wasm/*
paths:
- '**.rs'
- '**/Cargo.*'
- '.github/workflows/npmpkg.yml'
- 'codecov.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dsherret/rust-toolchain-file@v1
name: Install Rust (stable)
- name: install rust
run: cargo install wasm-pack
- name: build wasm
run: wasm-pack build --target bundler --no-default-features --scope pivot-lang --release
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: |
cd pkg
npm version prerelease -preid $(git rev-parse --short "$GITHUB_SHA")
npm publish --access public || true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}