diff --git a/.github/workflows/publish-npm-nightly.yml b/.github/workflows/publish-npm-nightly.yml index de2838af28..a1f4f7046d 100644 --- a/.github/workflows/publish-npm-nightly.yml +++ b/.github/workflows/publish-npm-nightly.yml @@ -49,6 +49,9 @@ jobs: publish: needs: test runs-on: ubuntu-latest + permissions: + contents: read + id-token: write if: ${{ github.repository_owner == 'element-plus' }} steps: - uses: actions/checkout@v3 @@ -70,6 +73,9 @@ jobs: - name: Gen npmrc run: echo "//registry.npmjs.com/:_authToken=${{ secrets.NPM_PUBLISH_TOKEN }}" >> ./.npmrc + - name: Update npm + run: npm install npm@latest -g + - name: Set Nightly run: sh ./scripts/nightly.sh diff --git a/scripts/publish.sh b/scripts/publish.sh index ea87730a6c..bb2dd22311 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -8,7 +8,7 @@ pnpm update:version pnpm build cd dist/element-plus -npm publish +npm publish --provenance cd - cd internal/eslint-config