Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix release #100

Merged
merged 2 commits into from
Jan 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Release
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -16,12 +18,14 @@ jobs:
export VERSION=`npm view wasm-music dist-tags.latest`
export NEWVERSION=`node -p "require('./package.json').version"`
echo $VERSION $NEWVERSION
if [ "$VERSION" != "$NEWVERSION" ]
then
npm install
echo "creating pianorolldemo bundle"
npm run bundle-pianorolldemo
echo "publishing new version"
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:
Expand Down
Loading