Skip to content

fix: deploy branch

fix: deploy branch #4

Workflow file for this run

name: Node CI
on: [ push, pull_request ]
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org
- name: Install Dependencies
run: npm i
- name: Format
run: npm run format
- name: Lint
run: npm run lint
- name: Test
run: npm run test
deploy:
runs-on: ubuntu-22.04
needs: test
# Run only on pushing to master
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
steps:
- name: checkout
uses: actions/checkout@v3
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org
- name: Install Dependencies
run: npm i
- name: Build
run: npm run build
- name: Release to NPM
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Enable npm provenance - (doing here so when we have tests that actually publish to local npm registry they won't fail)
npm_config_provenance: true
run: npx semantic-release