v5.0.0 #17
Workflow file for this run
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
name: Publish NPM package | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
name: Push NPM package to npmjs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
registry-url: 'https://registry.npmjs.org' | |
- name: Build | |
run: | | |
npm ci | |
npm run build | |
- name: Publish | |
if: '!github.event.release.prerelease' | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish PRERELEASE | |
if: 'github.event.release.prerelease' | |
run: npm publish --access public --tag next | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |