Skip to content

correct publish script #4

correct publish script

correct publish script #4

name: Test and deploy
on: push
jobs:
test_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Run build
run: npm run build
- name: Publish
if: github.ref == 'refs/heads/master'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}