Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

use prebuild script for now

Brendan Allan79e16c6af1e8
diff --git a/.github/prebuild.js b/.github/prebuild.js
index a3a8da1cd..e70a53596 100644
--- a/.github/prebuild.js
+++ b/.github/prebuild.js
@@ -98,7 +98,7 @@ rustflags = [
recursive: true,
});
- await signMacOSFrameworkLibs(nativeDeps).catch((e) => {
+ await symlinkSharedLibsMacOS(nativeDeps).catch((e) => {
console.error(`Failed to symlink shared libs.`);
throw e;
});
@@ -146,7 +146,7 @@ const NATIVE_DEPS_ASSETS = {
},
};
-async function signMacOSFrameworkLibs(nativeDeps) {
+async function symlinkSharedLibsMacOS(nativeDeps) {
// Framework
const framework = path.join(nativeDeps, "Spacedrive.framework");
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 0442634f7..9c84720e6 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -92,7 +92,9 @@ jobs:
matrix:
settings:
- target: x86_64-apple-darwin
+ prebuild: x86_64
- target: aarch64-apple-darwin
+ prebuild: aarch64
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -129,9 +131,6 @@ jobs:
node-version: "20"
cache: pnpm
- - name: Setup native dependencies
- run: pnpm cap-setup
-
- name: Install dependencies
run: pnpm install
@@ -158,6 +157,7 @@ jobs:
working-directory: apps/desktop
run: |
export TARGET_TRIPLE=${{ matrix.settings.target }}
+ node ${{ github.workspace }}/.github/prebuild.js darwin ${{ matrix.settings.prebuild }}
pnpm tauri build --target ${{ matrix.settings.target }} --config src-tauri/tauri.conf.prod.json
env:
# https://github.com/tauri-apps/tauri-action/issues/740
diff --git a/scripts/setup.js b/scripts/setup.js
index d4a9db257..a5a4e79dc 100644
--- a/scripts/setup.js
+++ b/scripts/setup.js
@@ -26,6 +26,8 @@ async function main() {
aarch64: "native-deps-aarch64-darwin-apple.tar.xz",
};
+ await fs.mkdir(targetDir, { recursive: true });
+
const nativeDepsTar = `${targetDir}/native-deps.tar.xz`;
if (!(await fileExists(nativeDepsTar))) {
const nativeDepsBytes = await fetch(