mirror of
https://github.com/SerTimBerrners-Lee/talkis.git
synced 2026-07-09 17:29:15 +00:00
ci: optimize macOS release workflow
This commit is contained in:
parent
d3a07bcea0
commit
af206402f3
7 changed files with 44 additions and 5 deletions
32
.github/workflows/release.yml
vendored
32
.github/workflows/release.yml
vendored
|
|
@ -32,15 +32,43 @@ jobs:
|
|||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Cache Bun dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.bun/install/cache
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-bun-
|
||||
|
||||
- name: Cache Rust build output
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/git
|
||||
~/.cargo/registry
|
||||
src-tauri/target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('src-tauri/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-
|
||||
|
||||
- name: Install frontend dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Run release checks
|
||||
run: bun run check:release
|
||||
run: |
|
||||
bun run check:versions
|
||||
bunx tsc --noEmit
|
||||
cargo check --manifest-path src-tauri/Cargo.toml
|
||||
bun run smoke:hotkey
|
||||
|
||||
- name: Build macOS bundles
|
||||
run: bun run tauri build
|
||||
run: |
|
||||
bun run prepare:sidecars
|
||||
bun run build
|
||||
bun run tauri build
|
||||
env:
|
||||
TALKIS_STT_RELEASE: "1"
|
||||
TALKIS_SKIP_BEFORE_BUILD: "1"
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||
|
||||
|
|
|
|||
9
scripts/before-tauri-build.mjs
Normal file
9
scripts/before-tauri-build.mjs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { execFileSync } from "node:child_process";
|
||||
|
||||
if (process.env.TALKIS_SKIP_BEFORE_BUILD === "1") {
|
||||
console.log("Skipping Tauri beforeBuildCommand because TALKIS_SKIP_BEFORE_BUILD=1");
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
execFileSync("bun", ["run", "prepare:sidecars"], { stdio: "inherit" });
|
||||
execFileSync("bun", ["run", "build"], { stdio: "inherit" });
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
set -euo pipefail
|
||||
|
||||
export MACOSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET:-11.0}"
|
||||
export TALKIS_STT_RELEASE=1
|
||||
|
||||
if [[ -z "${TAURI_SIGNING_PRIVATE_KEY:-}" && -n "${TAURI_SIGNING_PRIVATE_KEY_PATH:-}" ]]; then
|
||||
if [[ ! -f "${TAURI_SIGNING_PRIVATE_KEY_PATH}" ]]; then
|
||||
|
|
@ -14,6 +15,7 @@ if [[ -z "${TAURI_SIGNING_PRIVATE_KEY:-}" && -n "${TAURI_SIGNING_PRIVATE_KEY_PAT
|
|||
TAURI_SIGNING_PRIVATE_KEY="$(cat "${TAURI_SIGNING_PRIVATE_KEY_PATH}")"
|
||||
fi
|
||||
|
||||
TALKIS_STT_RELEASE=1 bun run prepare:sidecars
|
||||
bun run tauri build
|
||||
bun run prepare:sidecars
|
||||
bun run build
|
||||
TALKIS_SKIP_BEFORE_BUILD=1 bun run tauri build
|
||||
bun run postprocess:macos-release
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -7,7 +7,7 @@
|
|||
"build": {
|
||||
"beforeDevCommand": "bun run prepare:sidecars && bun run dev",
|
||||
"devUrl": "http://localhost:1420",
|
||||
"beforeBuildCommand": "bun run prepare:sidecars && bun run build",
|
||||
"beforeBuildCommand": "bun scripts/before-tauri-build.mjs",
|
||||
"frontendDist": "../dist"
|
||||
},
|
||||
"app": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue