From 2b662ae7c7b0c6836a7883108b784daa2ef6892f Mon Sep 17 00:00:00 2001 From: IamFurina Date: Thu, 3 Jul 2025 16:25:23 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=86=8D=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 3292f97..95c7999 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -1,21 +1,22 @@ -name: Publish Package to npmjs +# .github/workflows/release.yml +name: Release + on: - release: - types: [published] + push: + tags: + - 'v*' + jobs: - build: + release: runs-on: ubuntu-latest - permissions: - contents: read - id-token: write steps: - - uses: actions/checkout@v4 - # Setup .npmrc file to publish to npm - - uses: actions/setup-node@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: - node-version: '20.x' - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm publish --provenance --access public + node-version: 20 + registry-url: 'https://registry.npmjs.org/' + - run: npm install + - run: npm run build + - run: npm publish --access public env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file