Publish package #31
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |