Prebuild macOS smoke app in CI

This commit is contained in:
Mohamed Boudra
2026-03-10 14:38:24 +07:00
parent 36660b3cc1
commit 752d29c146
2 changed files with 31 additions and 15 deletions

View File

@@ -96,15 +96,28 @@ jobs:
- name: Build managed runtime for macOS
run: npm run prepare:managed-runtime --workspace=@getpaseo/desktop
- name: Smoke check managed runtime for macOS
run: npm run smoke:managed-daemon --workspace=@getpaseo/desktop
- name: Import Apple code-signing certificate
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
- name: Build packaged app for macOS smoke
env:
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: npm run tauri --workspace=@getpaseo/desktop build -- --target ${{ matrix.rust_target }}
- name: Smoke check managed runtime for macOS
env:
PASEO_MANAGED_SMOKE_SKIP_BUILD: "1"
PASEO_MANAGED_SMOKE_RUST_TARGET: ${{ matrix.rust_target }}
run: npm run smoke:managed-daemon --workspace=@getpaseo/desktop
- name: Sign bundled managed runtime for macOS
env:
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}

View File

@@ -26,12 +26,18 @@ const currentRuntimePointer = JSON.parse(
const currentRuntimeId = currentRuntimePointer.runtimeId;
function resolvePackagedBinary() {
const targetRoot = process.env.PASEO_MANAGED_SMOKE_RUST_TARGET
? path.join(
desktopRoot,
"src-tauri",
"target",
process.env.PASEO_MANAGED_SMOKE_RUST_TARGET,
"release"
)
: path.join(desktopRoot, "src-tauri", "target", "release");
if (process.platform === "darwin") {
return path.join(
desktopRoot,
"src-tauri",
"target",
"release",
targetRoot,
"bundle",
"macos",
"Paseo.app",
@@ -42,10 +48,7 @@ function resolvePackagedBinary() {
}
if (process.platform === "linux") {
return path.join(
desktopRoot,
"src-tauri",
"target",
"release",
targetRoot,
"bundle",
"appimage",
`Paseo_${desktopPackageJson.version}_amd64.AppImage`
@@ -53,10 +56,7 @@ function resolvePackagedBinary() {
}
if (process.platform === "win32") {
return path.join(
desktopRoot,
"src-tauri",
"target",
"release",
targetRoot,
"Paseo.exe"
);
}
@@ -358,6 +358,9 @@ function assertNoForbiddenPathsOrPorts(value, forbidden) {
}
async function ensurePackagedArtifact(binaryPath) {
if (process.env.PASEO_MANAGED_SMOKE_SKIP_BUILD === "1") {
return;
}
try {
await execFileAsync("npm", ["run", "build"], {
cwd: desktopRoot,