Skip to content

Do not publish loader when there's no new release #1366

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

Merged
merged 1 commit into from
Jun 29, 2020
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 ../..