Skip to content

Commit f9349fd

Browse files
authored
fix: node sdk (#1)
1 parent c18d472 commit f9349fd

14 files changed

Lines changed: 222 additions & 257 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node-version: [20, 22]
14+
node-version: [20, 22, 24]
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-node@v4

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
id-token: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 24
20+
cache: "npm"
21+
registry-url: https://registry.npmjs.org
22+
23+
- run: npm ci
24+
- run: npm run typecheck
25+
- run: npm run build
26+
27+
- name: Publish to NPM
28+
run: npm publish --provenance --access public
29+
env:
30+
NODE_AUTH_TOKEN: ${{ secrets.ONECLI_NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,21 @@
1-
name: Release Node.js SDK
2-
run-name: Release Node.js SDK
1+
name: Release
32

43
on:
54
push:
6-
tags:
7-
- "v*.*.*"
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
811

912
jobs:
10-
publish:
11-
name: Publish NPM
13+
release:
1214
runs-on: ubuntu-latest
13-
permissions:
14-
contents: read
15-
id-token: write
1615
steps:
17-
- uses: actions/checkout@v4
18-
19-
- uses: actions/setup-node@v4
16+
- name: release-please
17+
id: release
18+
uses: googleapis/release-please-action@v4
2019
with:
21-
node-version: 22
22-
cache: "npm"
23-
registry-url: https://registry.npmjs.org
24-
25-
- run: npm ci
26-
27-
- name: Set NPM version from tag
28-
run: npm version ${GITHUB_REF_NAME#v} --allow-same-version --no-git-tag-version
29-
30-
- run: npm run build
31-
32-
- name: Publish to NPM
33-
run: npm publish --provenance --access public
34-
env:
35-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
20+
release-type: node
21+
token: ${{ secrets.ONECLI_OSS_RELEASE }}

.mise.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tools]
2+
node = "24"

0 commit comments

Comments
 (0)