From f9f9a903188d3f61dc06d6a1ba421d3cec390562 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 27 May 2026 13:09:02 +0800 Subject: [PATCH] chore: switch to npm staged publishing --- .github/workflows/release.yml | 23 +++++------------------ package.json | 2 +- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5266a1..b620f5d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,3 @@ -# This action will publish the package to npm and create a GitHub release. -# Ref: https://docs.npmjs.com/trusted-publishers/ name: Release on: @@ -11,8 +9,8 @@ on: workflow_dispatch: permissions: - contents: write - id-token: write + contents: read + id-token: write # Required for OIDC jobs: publish: @@ -27,24 +25,13 @@ jobs: with: node-version: 24.15.0 - # Update npm to the latest version to enable OIDC - # Use corepack to install pnpm - - name: Setup Package Managers + - name: Setup Pnpm run: | - npm install -g npm@latest - npm --version npm install -g corepack@latest --force corepack enable - name: Install Dependencies - run: pnpm install + run: pnpm i - name: Publish - uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3 - with: - token: empty - - - name: Create GitHub Release - uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1 - with: - generateReleaseNotes: 'true' + run: pnpm stage publish --no-git-checks diff --git a/package.json b/package.json index e9d6961..1b72b1b 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "optional": true } }, - "packageManager": "pnpm@11.1.2", + "packageManager": "pnpm@11.3.0", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/"