fix(release): set releaseName for tauri-action

This commit is contained in:
Yuriy 2026-01-29 17:10:21 +03:00
parent 74e9cb9e0b
commit db21971761

View File

@ -1,4 +1,4 @@
# Релиз: сборка .app / DMG, подпись (при наличии ключа), публикация в GitHub Releases и latest.json
# Релиз: сборка .app / DMG / exe / deb, подпись (при наличии ключа), публикация в GitHub Releases и latest.json
# Настройка: в Secrets репозитория добавить TAURI_SIGNING_PRIVATE_KEY (приватный ключ от tauri signer generate)
name: Release
@ -6,14 +6,24 @@ on:
push:
tags:
- 'v*'
release:
types: [published]
concurrency:
group: release-${{ github.event.release.tag_name || github.ref_name }}
cancel-in-progress: false
permissions:
contents: write
jobs:
release:
name: Build & Release
runs-on: macos-latest
name: Build & Release (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
@ -24,23 +34,35 @@ jobs:
cache: 'npm'
cache-dependency-path: desktop/ui/package-lock.json
- name: Install Rust toolchain
- name: Install Rust toolchain (macOS)
if: matrix.os == 'macos-latest'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: aarch64-apple-darwin,x86_64-apple-darwin
- name: Install Rust toolchain (other)
if: matrix.os != 'macos-latest'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install Linux deps
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev \
librsvg2-dev patchelf pkg-config
- name: Install UI deps
run: cd desktop/ui && npm ci
- name: Debug tauri config
if: matrix.os == 'macos-latest'
run: |
echo "PWD=$(pwd)"
ls -la
echo "---- desktop/src-tauri/tauri.conf.json ----"
sed -n '1,200p' desktop/src-tauri/tauri.conf.json
echo "beforeBuildCommand:"
grep -n "beforeBuildCommand" desktop/src-tauri/tauri.conf.json || true
echo "Find other tauri configs:"
find . -maxdepth 4 \( -name "tauri.conf.json" -o -name "tauri.config.*" \) || true
- name: Build Tauri (release)
@ -52,4 +74,38 @@ jobs:
with:
projectPath: desktop/src-tauri
includeUpdaterJson: true
tagName: ${{ github.ref_name }}
tagName: ${{ github.event.release.tag_name || github.ref_name }}
releaseName: ${{ github.event.release.tag_name || github.ref_name }}
- name: Smoke — check macOS bundle
if: matrix.os == 'macos-latest'
run: |
ls -la desktop/src-tauri/target/release/bundle || true
find desktop/src-tauri/target/release/bundle -maxdepth 4 -type f 2>/dev/null | head -100
- name: Smoke — check Windows bundle
if: matrix.os == 'windows-latest'
run: dir desktop\src-tauri\target\release\bundle
- name: Smoke — check Linux bundle
if: matrix.os == 'ubuntu-latest'
run: |
ls -la desktop/src-tauri/target/release/bundle || true
find desktop/src-tauri/target/release/bundle -maxdepth 4 -type f 2>/dev/null | head -100
- name: Validate latest.json schema (if present)
id: validate-latest-json
if: matrix.os == 'macos-latest'
run: |
F=$(find desktop/src-tauri -name 'latest.json' -type f 2>/dev/null | head -1)
if [ -n "$F" ]; then
npx --yes ajv-cli@latest validate -s docs/latest.schema.json -d "$F" || (echo "--- latest.json (first 50 lines) ---"; head -50 "$F"; exit 1)
else
echo "latest.json not found in workspace (uploaded by tauri-action); skipping validation"
fi
- name: Dump latest.json on validation failure
if: failure() && matrix.os == 'macos-latest'
run: |
F=$(find desktop/src-tauri -name 'latest.json' -type f 2>/dev/null | head -1)
if [ -n "$F" ]; then echo "--- latest.json ---"; head -80 "$F"; fi