Merge pull request #7 from DuncanMcPherson/autoMocker-init #7
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: Deploy to NPM | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
jobs: | |
build_pack_and_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: cache node modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }} | |
- run: npm ci | |
- run: npm run setup-package | |
- run: cd dist | |
- run: npm pack && npm publish |