Skip to content

Commit 70d5629

Browse files
committed
build: allowing specifying of npm version to install
1 parent 7e737aa commit 70d5629

File tree

4 files changed

+52
-21
lines changed

4 files changed

+52
-21
lines changed

.github/workflows/manual-publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ jobs:
4141
with:
4242
node-version: 16.x
4343
registry-url: 'https://registry.npmjs.org'
44-
- uses: ./actions/install-latest-npm
44+
- uses: ./actions/install-npm-version
45+
with:
46+
npm_version: 9.5.0
4547
- name: 'Setup Redis'
4648
if: ${{ inputs.workspace_path == 'packages/store/node-server-sdk-redis' }}
4749
run: |

.github/workflows/release-please.yml

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ jobs:
4040
with:
4141
node-version: 16.x
4242
registry-url: 'https://registry.npmjs.org'
43-
- uses: ./actions/install-latest-npm
43+
- uses: ./actions/install-npm-version
44+
with:
45+
npm_version: 9.5.0
4446
- id: release-common
4547
name: Full release of packages/shared/common
4648
uses: ./actions/full-release
@@ -61,7 +63,9 @@ jobs:
6163
with:
6264
node-version: 16.x
6365
registry-url: 'https://registry.npmjs.org'
64-
- uses: ./actions/install-latest-npm
66+
- uses: ./actions/install-npm-version
67+
with:
68+
npm_version: 9.5.0
6569
- id: release-common
6670
name: Full release of packages/shared/sdk-server
6771
uses: ./actions/full-release
@@ -82,7 +86,9 @@ jobs:
8286
with:
8387
node-version: 16.x
8488
registry-url: 'https://registry.npmjs.org'
85-
- uses: ./actions/install-latest-npm
89+
- uses: ./actions/install-npm-version
90+
with:
91+
npm_version: 9.5.0
8692
- id: release-common
8793
name: Full release of packages/shared/sdk-server-edge
8894
uses: ./actions/full-release
@@ -103,7 +109,9 @@ jobs:
103109
with:
104110
node-version: 16.x
105111
registry-url: 'https://registry.npmjs.org'
106-
- uses: ./actions/install-latest-npm
112+
- uses: ./actions/install-npm-version
113+
with:
114+
npm_version: 9.5.0
107115
- id: release-common
108116
name: Full release of packages/shared/akamai-edgeworker-sdk
109117
uses: ./actions/full-release
@@ -124,7 +132,9 @@ jobs:
124132
with:
125133
node-version: 16.x
126134
registry-url: 'https://registry.npmjs.org'
127-
- uses: ./actions/install-latest-npm
135+
- uses: ./actions/install-npm-version
136+
with:
137+
npm_version: 9.5.0
128138
- id: release-common
129139
name: Full release of packages/sdk/cloudflare
130140
uses: ./actions/full-release
@@ -145,7 +155,9 @@ jobs:
145155
with:
146156
node-version: 16.x
147157
registry-url: 'https://registry.npmjs.org'
148-
- uses: ./actions/install-latest-npm
158+
- uses: ./actions/install-npm-version
159+
with:
160+
npm_version: 9.5.0
149161
- id: release-common
150162
name: Full release of packages/sdk/server-node
151163
uses: ./actions/full-release
@@ -166,7 +178,9 @@ jobs:
166178
with:
167179
node-version: 16.x
168180
registry-url: 'https://registry.npmjs.org'
169-
- uses: ./actions/install-latest-npm
181+
- uses: ./actions/install-npm-version
182+
with:
183+
npm_version: 9.5.0
170184
- id: release-common
171185
name: Full release of packages/sdk/vercel
172186
uses: ./actions/full-release
@@ -187,7 +201,9 @@ jobs:
187201
with:
188202
node-version: 16.x
189203
registry-url: 'https://registry.npmjs.org'
190-
- uses: ./actions/install-latest-npm
204+
- uses: ./actions/install-npm-version
205+
with:
206+
npm_version: 9.5.0
191207
- id: release-common
192208
name: Full release of packages/sdk/akamai-base
193209
uses: ./actions/full-release
@@ -208,7 +224,9 @@ jobs:
208224
with:
209225
node-version: 16.x
210226
registry-url: 'https://registry.npmjs.org'
211-
- uses: ./actions/install-latest-npm
227+
- uses: ./actions/install-npm-version
228+
with:
229+
npm_version: 9.5.0
212230
- id: release-common
213231
name: Full release of packages/sdk/akamai-edgekv
214232
uses: ./actions/full-release
@@ -229,7 +247,9 @@ jobs:
229247
with:
230248
node-version: 16.x
231249
registry-url: 'https://registry.npmjs.org'
232-
- uses: ./actions/install-latest-npm
250+
- uses: ./actions/install-npm-version
251+
with:
252+
npm_version: 9.5.0
233253
- run: |
234254
sudo apt-get update
235255
sudo apt-get install redis-server
@@ -254,7 +274,9 @@ jobs:
254274
with:
255275
node-version: 16.x
256276
registry-url: 'https://registry.npmjs.org'
257-
- uses: ./actions/install-latest-npm
277+
- uses: ./actions/install-npm-version
278+
with:
279+
npm_version: 9.5.0
258280
- run: |
259281
sudo docker run -d -p 8000:8000 amazon/dynamodb-local
260282
- id: release-common

actions/install-latest-npm/action.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Install npm version
2+
# Used to specify a version of npm that supports --provenance (for node installs < 18.X)
3+
description: Install the latest version of the npm CLI utility.
4+
inputs:
5+
npm_version:
6+
description: 'The version of npm to install'
7+
required: false
8+
default: latest
9+
10+
runs:
11+
using: composite
12+
steps:
13+
- name: 'Install specified npm version'
14+
shell: bash
15+
run: |
16+
npm install -g npm@${{ inputs.npm_version }}

0 commit comments

Comments
 (0)