File tree 3 files changed +12
-10
lines changed
3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 47
47
node-version : " 20"
48
48
cache : pnpm
49
49
50
+ - name : Setup native dependencies
51
+ run : pnpm cap-setup
52
+
50
53
- name : Install dependencies
51
54
run : pnpm install
52
55
59
62
echo 'VITE_SERVER_URL=${NEXT_PUBLIC_URL}' >> .env
60
63
echo "NEXT_PUBLIC_CAP_AWS_REGION=${{ secrets.NEXT_PUBLIC_CAP_AWS_REGION }}" >> .env
61
64
echo "NEXT_PUBLIC_CAP_AWS_BUCKET=${{ secrets.NEXT_PUBLIC_CAP_AWS_BUCKET }}" >> .env
62
-
65
+
63
66
- name : Copy .env to apps/desktop
64
67
run : cp .env apps/desktop/.env
65
68
70
73
working-directory : apps/desktop
71
74
run : |
72
75
export TARGET_TRIPLE=aarch64-apple-darwin
73
- node ${{ github.workspace }}/.github/prebuild.js darwin aarch64
74
76
pnpm tauri build --target aarch64-apple-darwin --debug
75
77
env :
76
78
CI : false
Original file line number Diff line number Diff line change 92
92
matrix :
93
93
settings :
94
94
- target : x86_64-apple-darwin
95
- prebuild : x86_64
96
95
- target : aarch64-apple-darwin
97
- prebuild : aarch64
98
96
steps :
99
97
- name : Checkout repository
100
98
uses : actions/checkout@v4
@@ -131,6 +129,9 @@ jobs:
131
129
node-version : " 20"
132
130
cache : pnpm
133
131
132
+ - name : Setup native dependencies
133
+ run : pnpm cap-setup
134
+
134
135
- name : Install dependencies
135
136
run : pnpm install
136
137
@@ -157,7 +158,6 @@ jobs:
157
158
working-directory : apps/desktop
158
159
run : |
159
160
export TARGET_TRIPLE=${{ matrix.settings.target }}
160
- node ${{ github.workspace }}/.github/prebuild.js darwin ${{ matrix.settings.prebuild }}
161
161
pnpm tauri build --target ${{ matrix.settings.target }} --config src-tauri/tauri.conf.prod.json
162
162
env :
163
163
# https://github.com/tauri-apps/tauri-action/issues/740
Original file line number Diff line number Diff line change @@ -14,22 +14,22 @@ const __dirname = path.dirname(__filename);
14
14
const __root = path . resolve ( path . join ( __dirname , ".." ) ) ;
15
15
const targetDir = `${ __root } /target` ;
16
16
17
+ const arch = process . arch === "arm64" ? "aarch64" : "x86_64" ;
18
+
17
19
async function main ( ) {
18
20
if ( process . platform === "darwin" ) {
19
21
const NATIVE_DEPS_URL =
20
22
"https://github.com/spacedriveapp/native-deps/releases/latest/download" ;
21
23
22
24
const NATIVE_DEPS_ASSETS = {
23
- darwin : {
24
- x86_64 : "native-deps-x86_64-darwin-apple.tar.xz" ,
25
- aarch64 : "native-deps-aarch64-darwin-apple.tar.xz" ,
26
- } ,
25
+ x86_64 : "native-deps-x86_64-darwin-apple.tar.xz" ,
26
+ aarch64 : "native-deps-aarch64-darwin-apple.tar.xz" ,
27
27
} ;
28
28
29
29
const nativeDepsTar = `${ targetDir } /native-deps.tar.xz` ;
30
30
if ( ! ( await fileExists ( nativeDepsTar ) ) ) {
31
31
const nativeDepsBytes = await fetch (
32
- `${ NATIVE_DEPS_URL } /${ NATIVE_DEPS_ASSETS . darwin . aarch64 } `
32
+ `${ NATIVE_DEPS_URL } /${ NATIVE_DEPS_ASSETS . darwin [ arch ] } `
33
33
)
34
34
. then ( ( r ) => r . blob ( ) )
35
35
. then ( ( b ) => b . arrayBuffer ( ) ) ;
You can’t perform that action at this time.
0 commit comments