mirror of
https://github.com/SerTimBerrners-Lee/talkis.git
synced 2026-10-02 20:29:19 +00:00
144 lines
4.7 KiB
YAML
144 lines
4.7 KiB
YAML
name: Release Preflight
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "release/v*"
|
|
workflow_dispatch:
|
|
inputs:
|
|
release_tag:
|
|
description: "Release version being checked, for example v0.3.12"
|
|
required: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: release-preflight-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Preflight ${{ matrix.platform }}
|
|
runs-on: ${{ matrix.runner }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- platform: macos
|
|
runner: macos-latest
|
|
bundle_targets: app
|
|
updater_platform: darwin-aarch64
|
|
- platform: windows
|
|
runner: windows-latest
|
|
bundle_targets: nsis
|
|
updater_platform: windows-x86_64
|
|
- platform: linux
|
|
runner: ubuntu-24.04
|
|
bundle_targets: appimage,deb
|
|
updater_platform: linux-x86_64
|
|
|
|
env:
|
|
MACOSX_DEPLOYMENT_TARGET: "11.0"
|
|
TALKIS_STT_RELEASE: "1"
|
|
TALKIS_SKIP_BEFORE_BUILD: "1"
|
|
TALKIS_UPDATER_PLATFORM: ${{ matrix.updater_platform }}
|
|
RELEASE_LABEL: ${{ github.event.inputs.release_tag || github.ref_name }}
|
|
RUSTFLAGS: ${{ matrix.platform == 'windows' && '-C target-feature=+crt-static' || '' }}
|
|
TRANSCRIBE_CMAKE_ARGS: ${{ matrix.platform == 'windows' && '-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded' || '' }}
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: 1.2.13
|
|
|
|
- name: Setup Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Install Linux Tauri dependencies
|
|
if: matrix.platform == 'linux'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
libwebkit2gtk-4.1-dev \
|
|
libayatana-appindicator3-dev \
|
|
libxdo-dev \
|
|
libasound2-dev \
|
|
libpipewire-0.3-dev \
|
|
librsvg2-dev \
|
|
patchelf \
|
|
clang \
|
|
libclang-dev \
|
|
cmake
|
|
|
|
- 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
|
|
|
|
- name: Build bundles
|
|
run: bun run tauri build --bundles ${{ matrix.bundle_targets }}
|
|
env:
|
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
|
|
|
- name: Verify Windows x64 release architecture
|
|
if: matrix.platform == 'windows'
|
|
run: bun run verify:windows-release
|
|
|
|
- name: Postprocess macOS release
|
|
if: matrix.platform == 'macos'
|
|
run: bun run postprocess:macos-release
|
|
env:
|
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
|
|
|
- name: Archive macOS app bundle
|
|
if: matrix.platform == 'macos'
|
|
run: |
|
|
SAFE_RELEASE_LABEL="${RELEASE_LABEL//\//-}"
|
|
ditto -c -k --sequesterRsrc --keepParent "src-tauri/target/release/bundle/macos/Talkis.app" "Talkis-${SAFE_RELEASE_LABEL}-macos.zip"
|
|
|
|
- name: Upload preflight bundle
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: talkis-${{ matrix.platform }}-preflight
|
|
retention-days: 3
|
|
path: |
|
|
src-tauri/target/release/bundle/appimage/*.AppImage
|
|
src-tauri/target/release/bundle/appimage/*.AppImage.sig
|
|
src-tauri/target/release/bundle/deb/*.deb
|
|
src-tauri/target/release/bundle/dmg/*.dmg
|
|
src-tauri/target/release/bundle/macos/*.app.tar.gz
|
|
src-tauri/target/release/bundle/macos/*.app.tar.gz.sig
|
|
src-tauri/target/release/bundle/msi/*.msi
|
|
src-tauri/target/release/bundle/msi/*.msi.sig
|
|
src-tauri/target/release/bundle/nsis/*.exe
|
|
src-tauri/target/release/bundle/nsis/*.exe.sig
|
|
src-tauri/target/release/bundle/rpm/*.rpm
|
|
Talkis-*-macos.zip
|
|
if-no-files-found: error
|