Skip to content

Commit 750d7f6

Browse files
authored
Merge pull request #89 from BitGo/DX-2098-trusted-publisher
ci: migrate to OIDC Trusted Publishing
2 parents 282703b + 70dd36c commit 750d7f6

File tree

4 files changed

+1931
-1814
lines changed

4 files changed

+1931
-1814
lines changed

.github/workflows/main_ci.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
6666
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4
6767
with:
68-
node-version: 20
68+
node-version: 22
6969
registry-url: https://registry.npmjs.org/
7070
cache: 'npm'
7171
- run: npm ci
@@ -76,7 +76,7 @@ jobs:
7676
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
7777
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4
7878
with:
79-
node-version: 20
79+
node-version: 22
8080
registry-url: https://registry.npmjs.org/
8181
cache: 'npm'
8282
- run: npm ci
@@ -87,7 +87,7 @@ jobs:
8787
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
8888
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4
8989
with:
90-
node-version: 20
90+
node-version: 22
9191
registry-url: https://registry.npmjs.org/
9292
cache: 'npm'
9393
- run: npm ci
@@ -98,7 +98,7 @@ jobs:
9898
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
9999
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4
100100
with:
101-
node-version: 20
101+
node-version: 22
102102
registry-url: https://registry.npmjs.org/
103103
cache: 'npm'
104104
- run: npm ci
@@ -109,7 +109,7 @@ jobs:
109109
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
110110
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4
111111
with:
112-
node-version: 20
112+
node-version: 22
113113
registry-url: https://registry.npmjs.org/
114114
cache: 'npm'
115115
- run: npm ci
@@ -120,7 +120,7 @@ jobs:
120120
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
121121
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4
122122
with:
123-
node-version: 20
123+
node-version: 22
124124
registry-url: https://registry.npmjs.org/
125125
cache: 'npm'
126126
- run: npm ci
@@ -129,6 +129,7 @@ jobs:
129129
release:
130130
if: github.repository_owner == 'BitGo' && github.event_name == 'push' && github.ref_name == 'master'
131131
runs-on: ubuntu-latest
132+
environment: publish-bitcoinjslib
132133
needs:
133134
- unit
134135
- integration
@@ -138,14 +139,19 @@ jobs:
138139
- gitdiff
139140
- lint
140141
- lint-tests
142+
permissions:
143+
id-token: write
144+
contents: write
141145
steps:
142146
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
143147
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4
144148
with:
145-
node-version: 20
149+
node-version: 22
146150
cache: 'npm'
151+
- name: Ensure npm 11.5.1
152+
run: |
153+
npm install -g [email protected]
147154
- run: npm ci
148155
- run: ./node_modules/.bin/semantic-release
149156
env:
150-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
151157
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.nsprc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
"GHSA-rc47-6667-2j5j": {
33
"active": true,
44
"notes": "ignore until a fix is introduced to semantic-release. See https://github.com/semantic-release/npm/issues/574",
5-
"expiry": 1676926476000
5+
"expiry": 1790000000000
6+
},
7+
"1109536": {
8+
"active": true,
9+
"notes": "cipher-base: Patched version exists, but upstream dependancies are pinned to vulnerable versions and have not been updated. See https://github.com/advisories/GHSA-cpq7-6gpm-g9rc",
10+
"expiry": 1790000000000
11+
},
12+
"1109535": {
13+
"active": true,
14+
"notes": "sha.js: Patched version exists, but upstream dependancies are pinned to vulnerable versions and have not been updated. See https://github.com/advisories/GHSA-95m3-7q98-8xr5",
15+
"expiry": 1790000000000
616
}
717
}

0 commit comments

Comments
 (0)