Skip to content

Fix publish script

Fix publish script #9

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 config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"
npm publish