Skip to content

Publish package

Publish package #31

Workflow file for this run

name: Publish package
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies and build
run: |
npm ci
npm run build
- name: Publish on main
if: github.ref == 'refs/heads/main'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish on canary
if: github.ref == 'refs/heads/canary'
run: /
npm version ${{github.ref_name}}
npm publish --tag canary
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}