From 28035a8513b5ff0fc2e27c3bfd606512d0889bb2 Mon Sep 17 00:00:00 2001 From: HPCesia Date: Wed, 13 Nov 2024 17:53:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-publish.yml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index bc95b17..86556f6 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -15,18 +15,12 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20 - - run: npm ci - - run: npm run build - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: https://registry.npmjs.org/ - - run: npm publish + registry-url: https://registry.npmjs.org + - name: Install dependencies + run: npm ci + - name: Build + run: npm run build + - name: Publish package to npm + run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + NODE_AUTH_TOKEN: ${{ secrets.npm_token }}