Build Package & Relase to npmjs #9
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: Build Package & Relase to npmjs | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: latest | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm i | |
- run: npm run prepare:build | |
- run: npm run build | |
- name: Prepare Release | |
run: npm run prepare:release ${{ github.ref_name }} | |
- name: npm publish | |
run: cd dist && npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |