Skip to content

Commit 3640506

Browse files
authored
chore: add provenance and trusted publishers in release workflow (#1651)
1 parent 1f26c1b commit 3640506

File tree

7 files changed

+14
-17
lines changed

7 files changed

+14
-17
lines changed

.github/workflows/pre-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
node-version-file: '.nvmrc'
4747

4848
- name: Install dependencies
49-
run: npm ci
49+
run: npm ci --ignore-scripts
5050

5151
# This prevent lerna command from throwing this error:
5252
# "Working tree has uncommitted changes, please commit or remove the following changes before continuing"

.github/workflows/release.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,13 @@ jobs:
5757
node-version-file: '.nvmrc'
5858

5959
- name: Install dependencies
60-
run: npm ci
61-
62-
# This prevent lerna command from throwing this error:
63-
# "Working tree has uncommitted changes, please commit or remove the following changes before continuing"
64-
- name: Ignore git uncommitted changes
65-
run: |
66-
git update-index --skip-worktree .npmrc
67-
60+
run: npm ci --ignore-scripts
61+
6862
- name: Publish the release
6963
env:
7064
DRY_RUN: "${{ inputs.dry-run }}"
7165
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
72-
run: |
73-
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
74-
npm run ci:release
66+
run: npm run ci:release
7567

7668
# The permissions configuration for this can be found at
7769
# https://github.com/elastic/oblt-infra/blob/main/conf/resources/repos/apm-agent-rum-js/02-gcp-oidc-elastic-cdn.tf

packages/rum-angular/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"license": "MIT",
77
"publishConfig": {
88
"access": "public",
9-
"directory": "dist"
9+
"directory": "dist",
10+
"provenance": true
1011
},
1112
"repository": {
1213
"type": "git",

packages/rum-core/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"source": "src/index.js",
99
"sideEffects": false,
1010
"publishConfig": {
11-
"access": "public"
11+
"access": "public",
12+
"provenance": true
1213
},
1314
"repository": {
1415
"type": "git",

packages/rum-react/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"node": ">=8.0.0"
1717
},
1818
"publishConfig": {
19-
"access": "public"
19+
"access": "public",
20+
"provenance": true
2021
},
2122
"repository": {
2223
"type": "git",

packages/rum-vue/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"script": "node ../../dev-utils/run-script.js"
3535
},
3636
"publishConfig": {
37-
"access": "public"
37+
"access": "public",
38+
"provenance": true
3839
},
3940
"repository": {
4041
"type": "git",

packages/rum/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"directory": "packages/rum"
1313
},
1414
"publishConfig": {
15-
"access": "public"
15+
"access": "public",
16+
"provenance": true
1617
},
1718
"scripts": {
1819
"prepublishOnly": "npm run build",

0 commit comments

Comments
 (0)