Merge pull request #161 from apideck-libraries/generator-update #81
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 to NPM | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: 'Setup Node.js' | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.x' | |
cache: yarn | |
- name: Install dependencies | |
run: yarn | |
- name: Unit Test | |
run: yarn test | |
- name: Prepare for Publish | |
run: yarn prepare | |
- name: Publish | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} |