diff --git a/.github/workflows/publish beta npm.yml b/.github/workflows/publish beta npm.yml index f930425..8131674 100644 --- a/.github/workflows/publish beta npm.yml +++ b/.github/workflows/publish beta npm.yml @@ -30,26 +30,12 @@ jobs: git config --local user.name "GitHub Action" - name: Change to Package Directory - run: cd packages/${{ github.event.inputs.packagePath }} - - - name: Clear node_modules and lock file - run: | - rm -rf node_modules - rm -f package-lock.json # 或者 yarn.lock - npm cache clean --force - - - name: Install Package Dependencies - run: npm install --legacy-peer-deps - - - name: Build Package - run: npm run build - - - name: Update Package Version - run: npm version ${{ github.event.inputs.betaVersion }} - - - name: Publish Package run: | + cd packages/${{ github.event.inputs.packagePath }} + npm install --legacy-peer-deps + npm run build + npm version ${{ github.event.inputs.betaVersion }} echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # 确保在您的 GitHub 仓库的 Secrets 中设置了 NPM_TOKEN + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # 确保在您的 GitHub 仓库的 Secrets 中设置了 NPM_TOKEN \ No newline at end of file diff --git a/.github/workflows/publish npm.yml b/.github/workflows/publish npm.yml index bd33d90..3d99ff6 100644 --- a/.github/workflows/publish npm.yml +++ b/.github/workflows/publish npm.yml @@ -35,7 +35,7 @@ jobs: run: cd packages/${{ github.event.inputs.packagePath }} - name: Install Package Dependencies - run: npm install + run: npm install --legacy-peer-deps - name: Build Package run: npm run build