Skip to content

Commit 28b2574

Browse files
committed
fix(CI): leverage artifacts in order to publish binaries
1 parent 4e77ae0 commit 28b2574

1 file changed

Lines changed: 55 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,52 +23,103 @@ jobs:
2323
permissions:
2424
contents: write
2525

26-
env:
27-
PKG_TARGET: ${{ matrix.target }}
28-
2926
steps:
27+
# ----------------------------
28+
# Checkout
29+
# ----------------------------
3030
- uses: actions/checkout@v4
3131
with:
3232
fetch-depth: 0
3333

34+
# ----------------------------
35+
# Node
36+
# ----------------------------
3437
- uses: actions/setup-node@v4
3538
with:
3639
node-version: 20
3740
registry-url: https://registry.npmjs.org
3841
cache: npm
3942

43+
# ----------------------------
44+
# Install
45+
# ----------------------------
4046
- run: npm ci
4147

42-
# IMPORTANT for wrtc native binaries
48+
# ----------------------------
49+
# Ensure correct wrtc native binary
50+
# ----------------------------
4351
- run: npm rebuild @roamhq/wrtc
52+
working-directory: ./implementations/js/server
4453

54+
# ----------------------------
55+
# Build
56+
# ----------------------------
4557
- run: npm run build
4658

59+
# ----------------------------
60+
# Package
61+
# ----------------------------
4762
- run: npx pkg . --targets ${{ matrix.target }}
4863
working-directory: ./implementations/js/server
4964

65+
# ----------------------------
5066
# macOS ad-hoc signing
67+
# ----------------------------
5168
- name: Codesign macOS binary
5269
if: matrix.os == 'macos-latest'
5370
run: |
5471
find ./implementations/js/server/dist/bin -type f -exec codesign --force --deep --sign - {} \;
5572
73+
# ----------------------------
74+
# Upload artifacts
75+
# ----------------------------
76+
- name: Upload artifacts
77+
uses: actions/upload-artifact@v4
78+
with:
79+
name: build-${{ matrix.target }}
80+
path: ./implementations/js/server/dist/bin/*
81+
5682
release:
5783
needs: build
84+
5885
runs-on: ubuntu-latest
5986

6087
permissions:
6188
contents: write
6289

6390
steps:
91+
# ----------------------------
92+
# Checkout
93+
# ----------------------------
6494
- uses: actions/checkout@v4
95+
with:
96+
fetch-depth: 0
6597

98+
# ----------------------------
99+
# Node
100+
# ----------------------------
66101
- uses: actions/setup-node@v4
67102
with:
68103
node-version: 20
104+
registry-url: https://registry.npmjs.org
105+
cache: npm
69106

107+
# ----------------------------
108+
# Install
109+
# ----------------------------
70110
- run: npm ci
71111

112+
# ----------------------------
113+
# Restore binaries EXACTLY where semantic-release expects them
114+
# ----------------------------
115+
- name: Download artifacts
116+
uses: actions/download-artifact@v4
117+
with:
118+
path: ./implementations/js/server/dist/bin
119+
120+
# ----------------------------
121+
# Release
122+
# ----------------------------
72123
- name: Release
73124
run: npx semantic-release
74125
env:

0 commit comments

Comments
 (0)