Skip to content

Commit 339dae0

Browse files
committed
Init commit
1 parent dfe5e64 commit 339dae0

3 files changed

Lines changed: 68 additions & 6 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: NPM Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
# Ensure only one publish runs at a time
9+
concurrency:
10+
group: npm-publish
11+
cancel-in-progress: false
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
prebuild-x64:
18+
uses: ./.github/workflows/prebuild-linux-x64.yml
19+
20+
prebuild-arm64:
21+
uses: ./.github/workflows/prebuild-linux-arm64.yml
22+
23+
publish:
24+
needs: [prebuild-x64, prebuild-arm64]
25+
# Only publish from the official repository, not forks
26+
if: github.repository == 'RobotWebTools/rclnodejs'
27+
runs-on: ubuntu-latest
28+
environment: npm-publish
29+
permissions:
30+
contents: read
31+
id-token: write
32+
steps:
33+
- uses: actions/checkout@v5
34+
35+
- name: Setup Node.js
36+
uses: actions/setup-node@v6
37+
with:
38+
node-version: 24.x
39+
registry-url: 'https://registry.npmjs.org'
40+
41+
- name: Download x64 prebuilds
42+
uses: actions/download-artifact@v4
43+
with:
44+
pattern: prebuilt-linux-x64-*
45+
path: prebuilds/linux-x64
46+
merge-multiple: true
47+
48+
- name: Download arm64 prebuilds
49+
uses: actions/download-artifact@v4
50+
with:
51+
pattern: prebuilt-linux-arm64-*
52+
path: prebuilds/linux-arm64
53+
merge-multiple: true
54+
55+
- name: List prebuilds
56+
run: |
57+
echo "=== x64 prebuilds ==="
58+
ls -la prebuilds/linux-x64/
59+
echo "=== arm64 prebuilds ==="
60+
ls -la prebuilds/linux-arm64/
61+
62+
- name: Pack
63+
run: ./scripts/npm-pack.sh
64+
65+
- name: Publish
66+
run: npm publish --provenance --access public ./dist/rclnodejs-*.tgz

.github/workflows/prebuild-linux-arm64.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: Prebuild Linux ARM64
22

33
on:
44
workflow_dispatch:
5-
push:
6-
tags:
7-
- '*'
5+
workflow_call:
86

97
jobs:
108
prebuild:

.github/workflows/prebuild-linux-x64.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: Prebuild Linux x64
22

33
on:
44
workflow_dispatch:
5-
push:
6-
tags:
7-
- '*'
5+
workflow_call:
86

97
jobs:
108
prebuild:

0 commit comments

Comments
 (0)