Skip to content

Commit cfeb7d2

Browse files
committed
ci: fix macOS runner and Node 24 deprecation in release workflow
- Replace unavailable macos-13 with macos-latest + Rosetta 2 cross-compilation for x64 - Split build job into build-macos-x64 and build-macos-arm64 for clarity - Add FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true to address Actions Node 20 deprecation
1 parent 1a8e2af commit cfeb7d2

1 file changed

Lines changed: 40 additions & 13 deletions

File tree

.github/workflows/release.yml

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,40 @@ on:
55
tags:
66
- 'v*'
77

8+
env:
9+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
10+
811
jobs:
9-
build-macos:
10-
strategy:
11-
matrix:
12-
include:
13-
- runner: macos-13
14-
arch: x64
15-
- runner: macos-latest
16-
arch: arm64
17-
runs-on: ${{ matrix.runner }}
12+
build-macos-x64:
13+
runs-on: macos-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Install Rosetta 2
19+
run: /usr/sbin/softwareupdate --install-rosetta --agree-to-license || true
20+
21+
- name: Set up Python (x64)
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.11'
25+
architecture: x64
26+
27+
- name: Verify Python architecture
28+
run: python3 -c "import platform; print(platform.machine())"
29+
30+
- name: Build macOS x64 binary
31+
run: python3 build_binaries.py darwin
32+
33+
- name: Upload artifact
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: darwin-x64
37+
path: bin/darwin/docugenius-cli
38+
retention-days: 1
39+
40+
build-macos-arm64:
41+
runs-on: macos-latest
1842
steps:
1943
- name: Checkout
2044
uses: actions/checkout@v4
@@ -24,18 +48,21 @@ jobs:
2448
with:
2549
python-version: '3.11'
2650

27-
- name: Build macOS binary
28-
run: python build_binaries.py darwin
51+
- name: Verify Python architecture
52+
run: python3 -c "import platform; print(platform.machine())"
53+
54+
- name: Build macOS arm64 binary
55+
run: python3 build_binaries.py darwin
2956

3057
- name: Upload artifact
3158
uses: actions/upload-artifact@v4
3259
with:
33-
name: darwin-${{ matrix.arch }}
60+
name: darwin-arm64
3461
path: bin/darwin/docugenius-cli
3562
retention-days: 1
3663

3764
package-and-release:
38-
needs: build-macos
65+
needs: [build-macos-x64, build-macos-arm64]
3966
runs-on: macos-latest
4067
steps:
4168
- name: Checkout

0 commit comments

Comments
 (0)