Skip to content

Commit

Permalink
build: allowing specifying of npm version to install
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoberano-ld committed Dec 7, 2023
1 parent 7e737aa commit 70d5629
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 21 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- uses: ./actions/install-latest-npm
- uses: ./actions/install-npm-version
with:
npm_version: 9.5.0
- name: 'Setup Redis'
if: ${{ inputs.workspace_path == 'packages/store/node-server-sdk-redis' }}
run: |
Expand Down
44 changes: 33 additions & 11 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ jobs:
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- uses: ./actions/install-latest-npm
- uses: ./actions/install-npm-version
with:
npm_version: 9.5.0
- id: release-common
name: Full release of packages/shared/common
uses: ./actions/full-release
Expand All @@ -61,7 +63,9 @@ jobs:
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- uses: ./actions/install-latest-npm
- uses: ./actions/install-npm-version
with:
npm_version: 9.5.0
- id: release-common
name: Full release of packages/shared/sdk-server
uses: ./actions/full-release
Expand All @@ -82,7 +86,9 @@ jobs:
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- uses: ./actions/install-latest-npm
- uses: ./actions/install-npm-version
with:
npm_version: 9.5.0
- id: release-common
name: Full release of packages/shared/sdk-server-edge
uses: ./actions/full-release
Expand All @@ -103,7 +109,9 @@ jobs:
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- uses: ./actions/install-latest-npm
- uses: ./actions/install-npm-version
with:
npm_version: 9.5.0
- id: release-common
name: Full release of packages/shared/akamai-edgeworker-sdk
uses: ./actions/full-release
Expand All @@ -124,7 +132,9 @@ jobs:
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- uses: ./actions/install-latest-npm
- uses: ./actions/install-npm-version
with:
npm_version: 9.5.0
- id: release-common
name: Full release of packages/sdk/cloudflare
uses: ./actions/full-release
Expand All @@ -145,7 +155,9 @@ jobs:
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- uses: ./actions/install-latest-npm
- uses: ./actions/install-npm-version
with:
npm_version: 9.5.0
- id: release-common
name: Full release of packages/sdk/server-node
uses: ./actions/full-release
Expand All @@ -166,7 +178,9 @@ jobs:
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- uses: ./actions/install-latest-npm
- uses: ./actions/install-npm-version
with:
npm_version: 9.5.0
- id: release-common
name: Full release of packages/sdk/vercel
uses: ./actions/full-release
Expand All @@ -187,7 +201,9 @@ jobs:
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- uses: ./actions/install-latest-npm
- uses: ./actions/install-npm-version
with:
npm_version: 9.5.0
- id: release-common
name: Full release of packages/sdk/akamai-base
uses: ./actions/full-release
Expand All @@ -208,7 +224,9 @@ jobs:
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- uses: ./actions/install-latest-npm
- uses: ./actions/install-npm-version
with:
npm_version: 9.5.0
- id: release-common
name: Full release of packages/sdk/akamai-edgekv
uses: ./actions/full-release
Expand All @@ -229,7 +247,9 @@ jobs:
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- uses: ./actions/install-latest-npm
- uses: ./actions/install-npm-version
with:
npm_version: 9.5.0
- run: |
sudo apt-get update
sudo apt-get install redis-server
Expand All @@ -254,7 +274,9 @@ jobs:
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- uses: ./actions/install-latest-npm
- uses: ./actions/install-npm-version
with:
npm_version: 9.5.0
- run: |
sudo docker run -d -p 8000:8000 amazon/dynamodb-local
- id: release-common
Expand Down
9 changes: 0 additions & 9 deletions actions/install-latest-npm/action.yml

This file was deleted.

16 changes: 16 additions & 0 deletions actions/install-npm-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Install npm version
# Used to specify a version of npm that supports --provenance (for node installs < 18.X)
description: Install the latest version of the npm CLI utility.
inputs:
npm_version:
description: 'The version of npm to install'
required: false
default: latest

runs:
using: composite
steps:
- name: 'Install specified npm version'
shell: bash
run: |
npm install -g npm@${{ inputs.npm_version }}

0 comments on commit 70d5629

Please sign in to comment.