Skip to content

Commit 2bae0fb

Browse files
committed
ci: adapt release process to pack the prebuild package
1 parent 7b14bb8 commit 2bae0fb

File tree

1 file changed

+58
-15
lines changed

1 file changed

+58
-15
lines changed

.github/workflows/push_branches.workflow.yaml

Lines changed: 58 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,56 @@ on:
77
- beta
88

99
jobs:
10+
prebuild:
11+
name: Prebuild on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-22.04, macos-13, macos-latest]
16+
include:
17+
- os: ubuntu-22.04
18+
arch: x64
19+
# - os: windows-latest
20+
# arch: x64
21+
# macOS Intel (x64)
22+
- os: macos-13
23+
arch: x64
24+
# macOS Apple Silicon (arm64)
25+
- os: macos-latest
26+
arch: arm64
27+
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Node.js 20
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 20
36+
cache: "npm"
37+
38+
- name: Install dependencies
39+
run: npm ci
40+
41+
- name: Build prebuilds (Windows/Linux)
42+
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'windows-latest'
43+
run: npm run build -- --arch=x64
44+
45+
- name: Build prebuilds (macOS)
46+
if: startsWith(matrix.os, 'macos')
47+
run: npm run build -- --arch=${{ matrix.arch }}
48+
49+
- name: Upload prebuilds
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: prebuilds-${{ matrix.os }}-${{ matrix.arch }}
53+
path: prebuilds/
54+
retention-days: 1
55+
1056
release:
57+
needs: prebuild
1158
name: Release process
12-
runs-on: ubuntu-20.04
59+
runs-on: ubuntu-22.04
1360
permissions:
1461
contents: write
1562
issues: write
@@ -19,22 +66,18 @@ jobs:
1966
- name: Checkout
2067
uses: actions/checkout@v3
2168

22-
- name: Setup Node.js
23-
uses: actions/setup-node@v3
69+
- name: Setup Node.js 20
70+
uses: actions/setup-node@v4
2471
with:
25-
node-version: "lts/*"
26-
registry-url: "https://registry.npmjs.org"
27-
scope: "@kuzzleio"
28-
29-
- name: Install
30-
run: npm ci
31-
72+
node-version: 20
73+
cache: "npm"
3274

33-
- name: configure
34-
run: npm run configure
35-
36-
- name: Build
37-
run: npm run build
75+
- name: Download all prebuilds
76+
uses: actions/download-artifact@v4
77+
with:
78+
pattern: prebuilds-*
79+
path: prebuilds/
80+
merge-multiple: true
3881

3982
- name: Release
4083
env:

0 commit comments

Comments
 (0)