Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish to npm

on:
push:
tags:
- '[0-9]*.[0-9]*.[0-9]*'
Comment thread
hustcc marked this conversation as resolved.

permissions:
id-token: write
contents: read

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
Comment thread
hustcc marked this conversation as resolved.

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Publish to NPM
run: |
if [[ "${{ github.ref_name }}" == *"-beta"* ]]; then
Comment thread
hustcc marked this conversation as resolved.
npm publish --access public --tag beta
else
npm publish --access public
Comment thread
hustcc marked this conversation as resolved.
fi
Loading