variable number of samples to fill (#103) #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |