Skip to content
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
9 changes: 7 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# On success, semantic-release will update the version and publish,
# triggering the postversion script that'll update the loader's version
# as well. If nothing was published, the version will still be '0.0.0'.
run: |
node node_modules/semantic-release/bin/semantic-release.js --unstable
cd lib/loader
npm config set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
npm publish --access public
if [ $(node -pe "require('./package.json').version") != "0.0.0" ]; then
npm config set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
npm publish --access public
fi
cd ../..