Skip to content

Publish

Publish #56

Workflow file for this run

name: Publish
on:
release:
types: [created]
jobs:
build:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- name: Install Dependencies
run: yarn
- name: Test
run: yarn test
publish-npm:
needs: build
name: Publish to NPM
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: yarn
- run: tsc
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}