From d425e6d4f3208a081ad6f0ccbe9c2390959240eb Mon Sep 17 00:00:00 2001 From: Lars Mikkelsen Date: Mon, 24 Apr 2023 07:04:10 -0600 Subject: [PATCH] chore(ci): enable npm package provenance (#27263) See https://github.blog/2023-04-19-introducing-npm-package-provenance/ --- .github/workflows/actions/publish-npm/action.yml | 5 ++++- .github/workflows/dev-build.yml | 2 ++ .github/workflows/nightly.yml | 2 ++ .github/workflows/release.yml | 2 ++ angular/package.json | 2 +- angular/scripts/package.json | 2 +- core/package.json | 2 +- docs/package.json | 2 +- packages/angular-server/package.json | 2 +- packages/react-router/package.json | 2 +- packages/react/package.json | 2 +- packages/vue-router/package.json | 2 +- packages/vue/package.json | 2 +- 13 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/actions/publish-npm/action.yml b/.github/workflows/actions/publish-npm/action.yml index 6d1d607e37..2c482c4fff 100644 --- a/.github/workflows/actions/publish-npm/action.yml +++ b/.github/workflows/actions/publish-npm/action.yml @@ -22,6 +22,9 @@ runs: - uses: actions/setup-node@v3 with: node-version: 16.x + - name: Install latest npm + run: npm install -g npm@latest + shell: bash - name: Install Dependencies run: lerna bootstrap --include-dependencies --scope ${{ inputs.scope }} --ignore-scripts -- --legacy-peer-deps shell: bash @@ -41,6 +44,6 @@ runs: env: NPM_TOKEN: ${{ inputs.token }} - name: Publish to NPM - run: npm publish ${{ inputs.folder }} --tag ${{ inputs.tag }} + run: npm publish ${{ inputs.folder }} --tag ${{ inputs.tag }} --provenance shell: bash working-directory: ${{ inputs.working-directory }} diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index 0e244f2185..77d6b18f73 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -24,6 +24,8 @@ jobs: release-ionic: needs: [create-dev-hash] + permissions: + id-token: write uses: ./.github/workflows/release-ionic.yml with: tag: dev diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index e69b5d107a..edc2d97fbe 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -29,6 +29,8 @@ jobs: release-ionic: needs: [create-nightly-hash] + permissions: + id-token: write uses: ./.github/workflows/release-ionic.yml with: tag: nightly diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c9f9e9adce..2210bbbf76 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,8 @@ on: jobs: release-ionic: + permissions: + id-token: write uses: ./.github/workflows/release-ionic.yml with: tag: ${{ inputs.tag }} diff --git a/angular/package.json b/angular/package.json index c3c58659f4..782a971a9f 100644 --- a/angular/package.json +++ b/angular/package.json @@ -17,7 +17,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/ionic-team/ionic.git" + "url": "git+https://github.com/ionic-team/ionic-framework.git" }, "bugs": { "url": "https://github.com/ionic-team/ionic/issues" diff --git a/angular/scripts/package.json b/angular/scripts/package.json index 67c7b04246..7760f7ab69 100644 --- a/angular/scripts/package.json +++ b/angular/scripts/package.json @@ -5,7 +5,7 @@ "keywords": [], "repository": { "type": "git", - "url": "https://github.com/ionic-team/ionic.git" + "url": "git+https://github.com/ionic-team/ionic-framework.git" }, "license": "MIT", "main": "umd/index.js", diff --git a/core/package.json b/core/package.json index 0faf5f0a9a..de5a2b1e43 100644 --- a/core/package.json +++ b/core/package.json @@ -99,7 +99,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/ionic-team/ionic.git" + "url": "git+https://github.com/ionic-team/ionic-framework.git" }, "bugs": { "url": "https://github.com/ionic-team/ionic/issues" diff --git a/docs/package.json b/docs/package.json index 9392ebd69a..4a59f43774 100644 --- a/docs/package.json +++ b/docs/package.json @@ -12,7 +12,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/ionic-team/ionic-docs.git" + "url": "git+https://github.com/ionic-team/ionic-framework.git" }, "bugs": { "url": "https://github.com/ionic-team/ionic-docs/issues" diff --git a/packages/angular-server/package.json b/packages/angular-server/package.json index 8000c83778..63e3f3ab9f 100644 --- a/packages/angular-server/package.json +++ b/packages/angular-server/package.json @@ -14,7 +14,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/ionic-team/ionic.git" + "url": "git+https://github.com/ionic-team/ionic-framework.git" }, "bugs": { "url": "https://github.com/ionic-team/ionic/issues" diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 567eb1446c..c0dc2e3a39 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -17,7 +17,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/ionic-team/ionic.git" + "url": "git+https://github.com/ionic-team/ionic-framework.git" }, "scripts": { "build": "npm run clean && npm run compile", diff --git a/packages/react/package.json b/packages/react/package.json index 64661a9610..1e2c328de2 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -17,7 +17,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/ionic-team/ionic.git" + "url": "git+https://github.com/ionic-team/ionic-framework.git" }, "scripts": { "build": "npm run clean && npm run copy && npm run compile", diff --git a/packages/vue-router/package.json b/packages/vue-router/package.json index de33512295..1435f838ac 100644 --- a/packages/vue-router/package.json +++ b/packages/vue-router/package.json @@ -22,7 +22,7 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/ionic-team/ionic.git" + "url": "git+https://github.com/ionic-team/ionic-framework.git" }, "keywords": [ "ionic", diff --git a/packages/vue/package.json b/packages/vue/package.json index f59ee9b798..f52ba70e5e 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -27,7 +27,7 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/ionic-team/ionic.git" + "url": "git+https://github.com/ionic-team/ionic-framework.git" }, "keywords": [ "ionic",