Skip to content

Commit 5581630

Browse files
fix release (#100)
* fix release * run dry-run of release pipeline on PR
1 parent 83c68e6 commit 5581630

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Release
22
on:
33
push:
44
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
57
jobs:
68
build:
79
runs-on: ubuntu-latest
@@ -16,12 +18,14 @@ jobs:
1618
export VERSION=`npm view wasm-music dist-tags.latest`
1719
export NEWVERSION=`node -p "require('./package.json').version"`
1820
echo $VERSION $NEWVERSION
19-
if [ "$VERSION" != "$NEWVERSION" ]
20-
then
21-
npm install
22-
echo "creating pianorolldemo bundle"
23-
npm run bundle-pianorolldemo
24-
echo "publishing new version"
21+
yarn install
22+
echo "creating pianorolldemo bundle"
23+
yarn bundle-pianorolldemo
24+
echo "publishing new version"
25+
if [[ "$VERSION" = "$NEWVERSION" || "$BRANCH" != "master" ]]; then
26+
echo "version change is $VERSION->$NEWVERSION, branch is $BRANCH, not publishing, only dry-run"
27+
npm publish --dry-run
28+
else
2529
npm publish
2630
fi
2731
env:

0 commit comments

Comments
 (0)