feat(desktop): add native app integrations (#1715)

This commit is contained in:
Carlos Florêncio
2026-07-15 23:19:00 +01:00
committed by GitHub
parent 4f717be720
commit d763b8c0c9
88 changed files with 7764 additions and 231 deletions
+63 -4
View File
@@ -31,6 +31,7 @@ name: release
# APPLE_CERTIFICATE / APPLE_CERTIFICATE_PASSWORD / KEYCHAIN_PASSWORD — macOS Developer ID signing
# APPLE_ID / APPLE_PASSWORD / APPLE_TEAM_ID or APPLE_API_KEY / APPLE_API_ISSUER / APPLE_API_KEY_P8 — macOS notarization
# WINDOWS_CERTIFICATE / WINDOWS_CERTIFICATE_PASSWORD — Windows installer signing
# TAURI_SIGNING_PRIVATE_KEY / TAURI_SIGNING_PRIVATE_KEY_PASSWORD — updater artifact signing
on:
workflow_dispatch:
@@ -565,11 +566,11 @@ jobs:
- platform: linux-x64
os: ubuntu-22.04
rust_target: x86_64-unknown-linux-gnu
tauri_bundles: deb,rpm
tauri_bundles: appimage,deb,rpm
- platform: linux-arm64
os: ubuntu-24.04-arm
rust_target: aarch64-unknown-linux-gnu
tauri_bundles: deb,rpm
tauri_bundles: appimage,deb,rpm
- platform: windows-x64
os: windows-latest
rust_target: x86_64-pc-windows-msvc
@@ -769,6 +770,22 @@ jobs:
& "$env:GITHUB_WORKSPACE/apps/desktop/src-tauri/windows-sign.ps1" -Path $path
}
- name: Detect Tauri updater signing input
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
run: |
set -euo pipefail
if [ -z "$TAURI_SIGNING_PRIVATE_KEY" ]; then
echo "UPDATER_SIGNING_ENABLED=false" >> "$GITHUB_ENV"
echo "::notice::Tauri updater signing key is absent; signed updater artifacts and latest.json will be skipped."
exit 0
fi
if ! bash scripts/release/updater-signing-ready.sh "${{ matrix.platform }}"; then
echo "::error::Updater signing prerequisites failed for ${{ matrix.platform }}." >&2
exit 1
fi
echo "UPDATER_SIGNING_ENABLED=true" >> "$GITHUB_ENV"
- name: Build Tauri desktop app
timeout-minutes: 70
env:
@@ -789,6 +806,8 @@ jobs:
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
WINDOWS_TIMESTAMP_URL: ${{ secrets.WINDOWS_TIMESTAMP_URL }}
WINDOWS_SIGNTOOL_PATH: ${{ secrets.WINDOWS_SIGNTOOL_PATH }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: |
set -euo pipefail
if [ "${MACOS_SIGNING_ENABLED:-false}" != "true" ]; then
@@ -809,6 +828,13 @@ jobs:
unset WINDOWS_TIMESTAMP_URL
unset WINDOWS_SIGNTOOL_PATH
fi
updater_config='{"bundle":{"createUpdaterArtifacts":false}}'
if [ "${UPDATER_SIGNING_ENABLED:-false}" = "true" ]; then
updater_config='{"bundle":{"createUpdaterArtifacts":"v1Compatible"}}'
else
unset TAURI_SIGNING_PRIVATE_KEY
unset TAURI_SIGNING_PRIVATE_KEY_PASSWORD
fi
pnpm -C apps --filter @kandev/desktop build:vite
cd apps/desktop
@@ -871,7 +897,8 @@ jobs:
pnpm tauri build \
--features desktop-runtime \
--target "${{ matrix.rust_target }}" \
--bundles "${{ matrix.tauri_bundles }}"
--bundles "${{ matrix.tauri_bundles }}" \
--config "$updater_config"
}
status=0
@@ -1011,7 +1038,11 @@ jobs:
-name '*.rpm' -o \
-name '*.msi' -o \
-name '*.exe' -o \
-name '*.AppImage' \
-name '*.AppImage' -o \
-name '*.app.tar.gz' -o \
-name '*.AppImage.tar.gz' -o \
-name '*.nsis.zip' -o \
-name '*.sig' \
\) -print0)
if [ "$found" -eq 0 ]; then
@@ -1390,6 +1421,9 @@ jobs:
ref: ${{ needs.prepare.outputs.ref }}
fetch-depth: 0
- name: Install updater signature verifier toolchain
run: rustup toolchain install 1.88.0 --profile minimal
- name: Generate release notes
uses: orhun/git-cliff-action@f50e11560dce63f7c33227798f90b924471a88b5 # v4
with:
@@ -1471,6 +1505,30 @@ jobs:
scripts/release/verify-desktop-assets.sh dist/release-assets
ls -lh dist/release-assets
- name: Generate and verify updater manifest
env:
RUSTUP_TOOLCHAIN: 1.88.0
run: |
set -euo pipefail
pub_date="$(git show -s --format=%cI '${{ needs.prepare.outputs.tag }}')"
node scripts/release/updater-manifest.mjs generate \
--assets-dir dist/release-assets \
--output dist/release-assets/latest.json \
--version "${{ needs.prepare.outputs.version }}" \
--tag "${{ needs.prepare.outputs.tag }}" \
--repository "${{ github.repository }}" \
--notes-file RELEASE_NOTES.md \
--pub-date "$pub_date" \
--allow-unsigned
if [ -f dist/release-assets/latest.json ]; then
node scripts/release/updater-manifest.mjs verify \
--assets-dir dist/release-assets \
--manifest dist/release-assets/latest.json \
--version "${{ needs.prepare.outputs.version }}" \
--tag "${{ needs.prepare.outputs.tag }}" \
--repository "${{ github.repository }}"
fi
- name: Publish release
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
with:
@@ -1481,6 +1539,7 @@ jobs:
dist/release-assets/kandev-*.tar.gz
dist/release-assets/kandev-*.tar.gz.sha256
dist/release-assets/kandev-desktop-*
dist/release-assets/latest.json
publish-npm:
name: Publish npm packages