Skip to content

update

update #3

Workflow file for this run

name: Publish to npm
on:
push:
tags:
- 'v*.*.*' # 当推送符合版本号的 tag 时触发,e.g., v1.0.0
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20' # 使用的 Node.js 版本
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
# - name: Build the project
# run: npm run build
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish