Skip to content

Commit cef7687

Browse files
author
Tanjeem Hossain
committed
ci: migrate to OIDC Trusted Publishing
Ticket: DX-2321
1 parent 1acba28 commit cef7687

5 files changed

Lines changed: 7688 additions & 5032 deletions

File tree

.github/workflows/main_ci.yml

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Run Tests
2-
2+
permissions:
3+
# Needed for npm Trusted Publishing
4+
id-token: write
5+
# Needed for semantic-release
6+
contents: write
7+
pull-requests: write
8+
issues: write
39
on:
410
push:
511
branches:
@@ -11,76 +17,77 @@ jobs:
1117
audit:
1218
runs-on: ubuntu-latest
1319
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v1
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-node@v4
1622
with:
17-
node-version: 12
23+
node-version: 22
1824
registry-url: https://registry.npmjs.org/
1925
- run: npm ci
2026
- run: npm run audit
2127
unit:
2228
runs-on: ubuntu-latest
2329
steps:
24-
- uses: actions/checkout@v2
25-
- uses: actions/setup-node@v1
30+
- uses: actions/checkout@v4
31+
- uses: actions/setup-node@v4
2632
with:
27-
node-version: 12
33+
node-version: 22
2834
registry-url: https://registry.npmjs.org/
2935
- run: npm ci
3036
- run: npm run unit
3137
coverage:
3238
runs-on: ubuntu-latest
3339
steps:
34-
- uses: actions/checkout@v2
35-
- uses: actions/setup-node@v1
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-node@v4
3642
with:
37-
node-version: 12
43+
node-version: 22
3844
registry-url: https://registry.npmjs.org/
3945
- run: npm ci
4046
- run: npm run coverage
4147
format:
4248
runs-on: ubuntu-latest
4349
steps:
44-
- uses: actions/checkout@v2
45-
- uses: actions/setup-node@v1
50+
- uses: actions/checkout@v4
51+
- uses: actions/setup-node@v4
4652
with:
47-
node-version: 12
53+
node-version: 22
4854
registry-url: https://registry.npmjs.org/
4955
- run: npm ci
5056
- run: npm run format:ci
5157
gitdiff:
5258
runs-on: ubuntu-latest
5359
steps:
54-
- uses: actions/checkout@v2
55-
- uses: actions/setup-node@v1
60+
- uses: actions/checkout@v4
61+
- uses: actions/setup-node@v4
5662
with:
57-
node-version: 12
63+
node-version: 22
5864
registry-url: https://registry.npmjs.org/
5965
- run: npm ci
6066
- run: npm run gitdiff:ci
6167
lint:
6268
runs-on: ubuntu-latest
6369
steps:
64-
- uses: actions/checkout@v2
65-
- uses: actions/setup-node@v1
70+
- uses: actions/checkout@v4
71+
- uses: actions/setup-node@v4
6672
with:
67-
node-version: 12
73+
node-version: 22
6874
registry-url: https://registry.npmjs.org/
6975
- run: npm ci
7076
- run: npm run lint
7177
lint-tests:
7278
runs-on: ubuntu-latest
7379
steps:
74-
- uses: actions/checkout@v2
75-
- uses: actions/setup-node@v1
80+
- uses: actions/checkout@v4
81+
- uses: actions/setup-node@v4
7682
with:
77-
node-version: 12
83+
node-version: 22
7884
registry-url: https://registry.npmjs.org/
7985
- run: npm ci
8086
- run: npm run lint:tests
8187
release:
8288
if: github.repository_owner == 'BitGo' && github.event_name == 'push' && github.ref_name == 'master'
8389
runs-on: ubuntu-latest
90+
environment: publish-ecpair
8491
needs:
8592
- audit
8693
- unit
@@ -90,13 +97,15 @@ jobs:
9097
- lint
9198
- lint-tests
9299
steps:
93-
- uses: actions/checkout@v3
94-
- uses: actions/setup-node@v3
100+
- uses: actions/checkout@v4
101+
- uses: actions/setup-node@v4
95102
with:
96-
node-version: 14
103+
node-version: 22
97104
cache: 'npm'
105+
- name: Ensure npm 11.5.1
106+
run: |
107+
npm install -g npm@11.5.1
98108
- run: npm ci
99109
- run: ./node_modules/.bin/semantic-release
100110
env:
101-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
102111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.npm-audit-whitelister.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
[]
1+
[
2+
"base-x (high) Homograph attack allows Unicode lookalike characters to bypass validation.:node_modules/base-x:1104177",
3+
"cipher-base (critical) cipher-base is missing type checks, leading to hash rewind and passing on crafted data:node_modules/cipher-base:1109536",
4+
"sha.js (critical) sha.js is missing type checks leading to hash rewind and passing on crafted data:node_modules/sha.js:1109535"
5+
]

0 commit comments

Comments
 (0)