Skip to content

Commit 7bf1dde

Browse files
Merge pull request #264 from aws-amplify/chore/upgrade-node-to-20
chore: upgrade CI to Node 20 and upgrade various github actions
2 parents 713c826 + 7d915e6 commit 7bf1dde

File tree

8 files changed

+26
-21
lines changed

8 files changed

+26
-21
lines changed

.github/actions/load-verdaccio-with-maplibre-gl-js-amplify/action.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ runs:
88
steps:
99
- name: Start verdaccio
1010
run: |
11-
npx verdaccio@5.25.0 &
11+
npx verdaccio@6.0.5 &
1212
while ! nc -z localhost 4873; do
1313
echo "Verdaccio not running yet"
1414
sleep 1
@@ -17,17 +17,22 @@ runs:
1717
# Run your commands after verdaccio is up and running
1818
echo "Verdaccio is up and running, proceeding with the script..."
1919
shell: bash
20-
- name: Install and run npm-cli-login
20+
- name: Authenticate with Verdaccio
2121
shell: bash
2222
env:
2323
NPM_REGISTRY: http://localhost:4873/
2424
NPM_USER: verdaccio
2525
NPM_PASS: verdaccio
2626
NPM_EMAIL: verdaccio@amplify.js
2727
run: |
28-
npm i -g npm-cli-adduser
29-
npm-cli-adduser
30-
sleep 1
28+
TOKEN=$(curl -X PUT \
29+
-H "Content-Type: application/json" \
30+
-d "{\"name\": \"$NPM_USER\", \"password\": \"$NPM_PASS\"}" \
31+
$NPM_REGISTRY-/user/org.couchdb.user:$NPM_USER | jq -r '.token')
32+
33+
echo "registry=$NPM_REGISTRY
34+
//localhost:4873/:_authToken=$TOKEN" > ~/.npmrc
35+
3136
- name: Configure registry and git
3237
shell: bash
3338
working-directory: ./maplibre-gl-js-amplify

.github/actions/node-and-build/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ inputs:
99
runs:
1010
using: 'composite'
1111
steps:
12-
- name: Setup Node.js 18
13-
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 https://github.com/actions/setup-node/commit/64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
12+
- name: Setup Node.js 20
13+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 https://github.com/actions/setup-node/commit/cdca7365b2dadb8aad0a33bc7601856ffabcc48e
1414
with:
15-
node-version: 18.20.2
15+
node-version: 20
1616
env:
1717
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
18-
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
18+
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 https://github.com/actions/cache/commit/5a3ec84eff668545956fd18022155c47e93e2684
1919
id: cache-build-artifacts
2020
with:
2121
path: |

.github/actions/setup-samples-staging/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ runs:
1212
using: 'composite'
1313
steps:
1414
- name: Create cache
15-
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 https://github.com/actions/cache/commit/88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
15+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 https://github.com/actions/cache/commit/5a3ec84eff668545956fd18022155c47e93e2684
1616
id: cache-samples-staging-build
1717
with:
1818
key: aws-amplify-js-samples-staging-build-${{ github.sha }}
@@ -22,7 +22,7 @@ runs:
2222
env:
2323
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
2424
- name: Checkout staging repo
25-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 https://github.com/actions/checkout/commit/11bd71901bbe5b1630ceea73d27597364c9af683
2626
with:
2727
repository: ${{ github.repository_owner }}/amplify-js-samples-staging
2828
path: amplify-js-samples-staging

.github/workflows/callable-e2e-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555

5656
steps:
5757
- name: Checkout repository
58-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
58+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 https://github.com/actions/checkout/commit/11bd71901bbe5b1630ceea73d27597364c9af683
5959
with:
6060
path: maplibre-gl-js-amplify
6161
- name: Setup node and build the repository

.github/workflows/callable-e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout repository
13-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
13+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 https://github.com/actions/checkout/commit/11bd71901bbe5b1630ceea73d27597364c9af683
1414
with:
1515
path: maplibre-gl-js-amplify
1616
- name: Read integ config files

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 https://github.com/actions/checkout/commit/11bd71901bbe5b1630ceea73d27597364c9af683
2626

2727
- name: Initialize CodeQL
2828
uses: github/codeql-action/init@d23060145bc9131d50558d5d4185494a20208101 # v2.12.5 https://github.com/github/codeql-action/commit/d23060145bc9131d50558d5d4185494a20208101

.github/workflows/coverage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ jobs:
88

99
strategy:
1010
matrix:
11-
node-version: [18.20.2]
11+
node-version: [20.x]
1212

1313
steps:
1414
- name: Checkout repository
15-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 https://github.com/actions/checkout/commit/11bd71901bbe5b1630ceea73d27597364c9af683
1616
with:
1717
fetch-depth: 2
1818

1919
- name: Set up Node.js ${{ matrix.node-version }}
20-
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 https://github.com/actions/setup-node/commit/64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
20+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 https://github.com/actions/setup-node/commit/cdca7365b2dadb8aad0a33bc7601856ffabcc48e
2121
with:
2222
node-version: ${{ matrix.node-version }}
2323

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
runs-on: ubuntu-latest
1919
needs: [e2e]
2020
steps:
21-
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
21+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 https://github.com/actions/checkout/commit/11bd71901bbe5b1630ceea73d27597364c9af683
2222

23-
- name: Use Node.js 18 x64
24-
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 https://github.com/actions/setup-node/commit/64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
23+
- name: Use Node.js 20 x64
24+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 https://github.com/actions/setup-node/commit/cdca7365b2dadb8aad0a33bc7601856ffabcc48e
2525
with:
26-
node-version: 18.20.2
26+
node-version: 20
2727
architecture: x64
2828
registry-url: 'https://registry.npmjs.org'
2929

0 commit comments

Comments
 (0)