Skip to content

variable number of samples to fill #44

variable number of samples to fill

variable number of samples to fill #44

Workflow file for this run

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"
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
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 }}