Skip to content

Commit ef03cba

Browse files
committed
add darwin
1 parent 24d188e commit ef03cba

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

.github/workflows/release.yml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,45 @@ jobs:
5959
name: jsar-runtime-android
6060
path: './build/output/release/aarch64-linux-android'
6161

62+
build-macOS:
63+
runs-on: macos-latest
64+
steps:
65+
- uses: actions/checkout@v3
66+
- name: Set up Rust
67+
uses: actions-rs/toolchain@v1
68+
with:
69+
profile: minimal
70+
toolchain: 1.74.0
71+
- name: Install Rust targets
72+
run: |
73+
rustup target add aarch64-linux-android
74+
rustup target add aarch64-apple-darwin
75+
rustup target add x86_64-apple-darwin
76+
rustup target add x86_64-pc-windows-msvc
77+
- name: Set up Protoc
78+
uses: arduino/setup-protoc@v2
79+
with:
80+
version: "21.x"
81+
- uses: actions/[email protected]
82+
with:
83+
node-version: 18.16.0
84+
- name: Install Node.js dependencies
85+
run: npm ci && npx tsc --version
86+
- name: Build JavaScript bundle
87+
run: |
88+
make jsbundle
89+
- name: Build library for macOS
90+
run: |
91+
protoc --version
92+
make darwin
93+
env:
94+
USE_SYSTEM_PROTOC: "true"
95+
- name: Upload artifacts
96+
uses: actions/upload-artifact@v2
97+
with:
98+
name: jsar-runtime-darwin
99+
path: './build/output/release/universal-apple-darwin'
100+
62101
build-windows:
63102
runs-on: windows-latest
64103
steps:
@@ -109,6 +148,11 @@ jobs:
109148
with:
110149
name: jsar-runtime-android
111150
path: out/android
151+
- name: Download macOS artifact
152+
uses: actions/download-artifact@v2
153+
with:
154+
name: jsar-runtime-darwin
155+
path: out/darwin
112156
- name: Download Windows artifact
113157
uses: actions/download-artifact@v2
114158
with:
@@ -117,7 +161,7 @@ jobs:
117161
- name: Create package
118162
run: |
119163
cp -r src/proto out/
120-
tar -czvf jsar-runtime-release.tar.gz out
164+
tar -czvf jsar-runtime-release.tar.gz out/
121165
- name: Create Release
122166
uses: softprops/action-gh-release@v1
123167
with:

0 commit comments

Comments
 (0)