From 269456def365514a9c40bac09afed4c28820a4a7 Mon Sep 17 00:00:00 2001 From: MoeFurina Date: Fri, 22 May 2026 20:45:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E9=99=A4=E5=AF=B9github=20regi?= =?UTF-8?q?stry=20=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm.yml | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 867311e..7376d35 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -1,38 +1,25 @@ -# .github/workflows/release.yml name: Release on: release: types: [published] - workflow_dispatch: + +permissions: + contents: read + id-token: write jobs: - release: + publish: runs-on: ubuntu-latest - permissions: - id-token: write - contents: read - packages: write + steps: - uses: actions/checkout@v6 - # 发布到 NPM Registry - - name: Setup Node.js for NPM - uses: actions/setup-node@v6 + - uses: actions/setup-node@v6 with: node-version: 24 - registry-url: 'https://registry.npmjs.org' - - run: npm install - - name: Publish to NPM - run: npm publish --access public + cache: npm - # 发布到 GitHub Packages - - name: Setup Node.js for GitHub Packages - uses: actions/setup-node@v6 - with: - node-version: 24 - registry-url: 'https://npm.pkg.github.com' - - name: Publish to GitHub Packages - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ github.token }} \ No newline at end of file + - run: npm ci + + - run: npm publish --access public \ No newline at end of file