Skip to content

Run publish step in same job #2

Run publish step in same job

Run publish step in same job #2

name: Test and deploy
on: push
jobs:
test:
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