-
-
Notifications
You must be signed in to change notification settings - Fork 33
32 lines (32 loc) · 970 Bytes
/
release.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
name: Release
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: |
cd wasmaudioworklet
export VERSION=`npm view wasm-music dist-tags.latest`
export NEWVERSION=`node -p "require('./package.json').version"`
echo $VERSION $NEWVERSION
yarn install
echo "creating pianorolldemo bundle"
yarn bundle-pianorolldemo
echo "publishing new version"
if [[ "$VERSION" = "$NEWVERSION" || "$BRANCH" != "master" ]]; then
echo "version change is $VERSION->$NEWVERSION, branch is $BRANCH, not publishing, only dry-run"
npm publish --dry-run
else
npm publish
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}