Bump version #9
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
# .github/release.yml | |
name: Release on npm | |
on: | |
push: | |
branches: | |
- 'master' | |
paths: | |
- package.json | |
jobs: | |
build_and_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: | | |
yarn install | |
- name: Build | |
run: | | |
yarn clean | |
yarn build | |
- id: publish | |
name: Publish to NPM | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
dry-run: false | |
- name: Post-publish | |
if: steps.publish.outputs.type != 'none' | |
run: | | |
echo "Published ${{ steps.publish.outputs.type }} version: ${{ steps.publish.outputs.version }}" | |
- name: Publish skipped | |
if: steps.publish.outputs.type == 'none' | |
run: | | |
echo "Version in package.json has not changed. Skipping." | |
exit 0 |