From 07031d3148b0e4caed94fd958bc413f4d056e8d3 Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 3 Aug 2025 21:36:49 +0800 Subject: [PATCH] chore: enable OIDC publishing --- .github/workflows/release.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c322f87..77297c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,28 +16,33 @@ permissions: jobs: publish: runs-on: ubuntu-latest + environment: npm steps: - name: Checkout uses: actions/checkout@v4 - - name: Install Pnpm - run: | - npm install -g corepack@latest --force - corepack enable - - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 22 cache: "pnpm" + # Use corepack to install pnpm + # Update npm to the latest version to enable OIDC + - name: Setup Package Managers + run: | + npm install -g npm@latest + npm --version + npm install -g corepack@latest --force + corepack enable + - name: Install Dependencies run: pnpm install - name: Publish uses: JS-DevTools/npm-publish@v3 with: - token: ${{ secrets.RSBUILD_PLUGIN_NPM_TOKEN }} + token: empty - name: Create GitHub Release uses: ncipollo/release-action@v1