From b4927b0d863e852ca599519ef6a4af40b86029d4 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Mon, 7 Aug 2023 19:30:58 +0800 Subject: [PATCH] feat(ci): enable provenance (#13799) --- .github/workflows/publish-npm-nightly.yml | 6 ++++++ scripts/publish.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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