Skip to content

chore: refine release workflow conditions for main branch and tag pub… #3

chore: refine release workflow conditions for main branch and tag pub…

chore: refine release workflow conditions for main branch and tag pub… #3

Workflow file for this run

name: Release
on:
push:
branches:
- main
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Publish to NPM
if: startsWith(github.ref, 'refs/tags/v')
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}