Skip to content

Commit 4fcb8d2

Browse files
authored
ci: Update workflows to Node 24 and enable OIDC publishing (#716)
* ci: Update workflows to Node 24 and enable OIDC publishing Updates: - Upgrade actions/checkout from v4 to v5 - Upgrade actions/setup-node from v4 to v6 - Update Node.js version from 22 to 24 across all workflows - Enable OIDC authentication in publish.yml workflow - Add id-token: write permission for npm OIDC - Remove NPM_TOKEN secret requirement - Add comments explaining OIDC usage - Fix package.json metadata: - sui/ts: Correct repository URLs and add homepage - evm/ts: Add missing homepage field OIDC publishing requires npm CLI 11.5.1+ (included in Node 24) and trusted publisher configuration on npmjs.com for each package. * sdk/test: Run hub tests sequentially to prevent nonce collisions Parallel execution with Promise.all caused EVM nonce conflicts when both test instances tried to send transactions from the same accounts simultaneously. Running sequentially ensures proper nonce ordering.
1 parent fb8a087 commit 4fcb8d2

File tree

10 files changed

+41
-36
lines changed

10 files changed

+41
-36
lines changed

.github/actions/setup-anchor/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ inputs:
1717
runs:
1818
using: "composite"
1919
steps:
20-
- uses: actions/setup-node@v4
20+
- uses: actions/setup-node@v6
2121
with:
2222
node-version: ${{ inputs.node-version }}
2323
- name: Cache Solana CLI tools

.github/workflows/cli.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
test-evm:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515
- run: docker build -f Dockerfile.cli --target cli-local-test . --progress=plain
1616

1717
test-solana:
1818
runs-on: tilt-kube-public
1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v5
2121
- run: docker build -f Dockerfile.cli --target cli-local-test-solana . --progress=plain

.github/workflows/evm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
name: forge test
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v5
2626
with:
2727
submodules: recursive
2828

@@ -54,7 +54,7 @@ jobs:
5454
name: echidna
5555
runs-on: ubuntu-latest
5656
steps:
57-
- uses: actions/checkout@v4
57+
- uses: actions/checkout@v5
5858
with:
5959
submodules: recursive
6060

.github/workflows/publish.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,18 @@ on:
1111
jobs:
1212
publish-ts-sdk:
1313
runs-on: ubuntu-latest
14+
permissions:
15+
id-token: write # Required for OIDC authentication with npm
16+
contents: read
1417

1518
steps:
16-
- uses: actions/checkout@v4
17-
- uses: actions/setup-node@v4
19+
- uses: actions/checkout@v5
20+
- uses: actions/setup-node@v6
1821
with:
19-
node-version: 22
22+
node-version: 24
2023
cache: "npm"
2124
registry-url: "https://registry.npmjs.org"
25+
# Node 24 ships with npm 11.x which includes OIDC support (requires 11.5.1+)
2226
- run: npm ci
2327
- run: npm run version ${{ inputs.version }}
2428
- run: npm run build --if-present
@@ -38,7 +42,8 @@ jobs:
3842
--workspace solana \
3943
--workspace sui \
4044
--workspace sdk/route
45+
# OIDC authentication is used automatically by npm CLI 11.5.1+
46+
# No NPM_TOKEN secret needed - authentication happens via OpenID Connect
47+
# See: https://docs.npmjs.com/trusted-publishers/
4148
env:
4249
VERSION: ${{ inputs.version }}
43-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
44-
# https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry

.github/workflows/sdk.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v4
15-
- uses: actions/setup-node@v4
14+
- uses: actions/checkout@v5
15+
- uses: actions/setup-node@v6
1616
with:
17-
node-version: 22
17+
node-version: 24
1818
cache: "npm"
1919
registry-url: "https://registry.npmjs.org"
2020
- run: npm ci

.github/workflows/solana.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
env:
1919
RUSTFLAGS: -Dwarnings
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v5
2222

2323
- name: Get rust toolchain version
2424
id: toolchain
@@ -88,7 +88,7 @@ jobs:
8888
name: Check version
8989
runs-on: ubuntu-latest
9090
steps:
91-
- uses: actions/checkout@v4
91+
- uses: actions/checkout@v5
9292

9393
- run: ./scripts/sync-versions --check
9494
shell: bash
@@ -97,11 +97,11 @@ jobs:
9797
name: Anchor Test
9898
runs-on: ubuntu-latest
9999
env:
100-
node-version: "20.11.0"
100+
node-version: "24"
101101
solana-cli-version: "1.18.26"
102102
anchor-version: "0.29.0"
103103
steps:
104-
- uses: actions/checkout@v4
104+
- uses: actions/checkout@v5
105105

106106
- uses: ./.github/actions/setup-anchor
107107
with:

.github/workflows/tilt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Clear repository
2525
run: |
2626
rm -rf $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
27-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v5
2828
with:
2929
submodules: recursive
3030
- name: Expand for link to Tilt dashboard (only available during build)

evm/ts/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"bugs": {
99
"url": "https://github.com/wormhole-foundation/native-token-transfers"
1010
},
11+
"homepage": "https://github.com/wormhole-foundation/native-token-transfers#readme",
1112
"directories": {
1213
"test": "__tests__"
1314
},

sdk/__tests__/index.test.ts

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,19 @@ describe("Hub and Spoke Tests", function () {
7171
});
7272

7373
test("Test Solana and Ethereum Hubs", async () => {
74-
await Promise.all([
75-
testHub(
76-
"Solana",
77-
"Ethereum",
78-
"Bsc",
79-
makeGetNativeSigner(ETH_PRIVATE_KEY, SOL_PRIVATE_KEY),
80-
ACCT_MNEMONIC
81-
),
82-
testHub(
83-
"Ethereum",
84-
"Bsc",
85-
"Solana",
86-
makeGetNativeSigner(ETH_PRIVATE_KEY_2, SOL_PRIVATE_KEY_2),
87-
ACCT_MNEMONIC_2
88-
),
89-
]);
74+
await testHub(
75+
"Solana",
76+
"Ethereum",
77+
"Bsc",
78+
makeGetNativeSigner(ETH_PRIVATE_KEY, SOL_PRIVATE_KEY),
79+
ACCT_MNEMONIC
80+
);
81+
await testHub(
82+
"Ethereum",
83+
"Bsc",
84+
"Solana",
85+
makeGetNativeSigner(ETH_PRIVATE_KEY_2, SOL_PRIVATE_KEY_2),
86+
ACCT_MNEMONIC_2
87+
);
9088
});
9189
});

sui/ts/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
"version": "0.5.0",
44
"repository": {
55
"type": "git",
6-
"url": "git+https://github.com/wormhole-foundation/example-native-token-transfers.git"
6+
"url": "git+https://github.com/wormhole-foundation/native-token-transfers.git"
77
},
88
"bugs": {
9-
"url": "https://github.com/wormhole-foundation/example-native-token-transfers"
9+
"url": "https://github.com/wormhole-foundation/native-token-transfers"
1010
},
11+
"homepage": "https://github.com/wormhole-foundation/native-token-transfers#readme",
1112
"directories": {
1213
"test": "__tests__"
1314
},

0 commit comments

Comments
 (0)