Skip to content

ci: 添加测试步骤并使用pnpm替换npm命令 #33

ci: 添加测试步骤并使用pnpm替换npm命令

ci: 添加测试步骤并使用pnpm替换npm命令 #33

Workflow file for this run

name: Publish Npm Package
on:
push:
tags:
- "v*"
workflow_dispatch: # 手动触发工作流
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- run: rm -rf .npmrc
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 24
registry-url: https://registry.npmjs.org/
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
# version: 10
run_install: true
- name: Run Test
run: pnpm run test
- name: Publish
run: |
pnpm run build
npm publish