LD-FDPI/.github/workflows/release.yml
2026-11-23 03:45:09 +03:00

98 lines
2.8 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
version:
description: "Release version (without v)"
required: true
default: "1.7.0"
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Install dependencies
run: npm ci
- name: Generate version.json
shell: pwsh
run: |
$version = node -p "require('./package.json').version"
$payload = [ordered]@{
version = $version
page_url = "https://ttmadethat.shop/ld-fdpi"
notes = "LD FDPI $version"
}
[IO.File]::WriteAllText(
(Join-Path $PWD "version.json"),
($payload | ConvertTo-Json),
(New-Object Text.UTF8Encoding($false))
)
- name: Build and publish signed release
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
with:
tagName: ${{ github.event_name == 'workflow_dispatch' && format('v{0}', inputs.version) || github.ref_name }}
releaseName: "LD FDPI ${{ github.event_name == 'workflow_dispatch' && inputs.version || github.ref_name }}"
releaseBody: |
LD FDPI release.
- Windows 10/11 x64
- Authenticode yok; SmartScreen uyarabilir.
- Updater paketleri Minisign ile imzalıdır.
releaseDraft: false
prerelease: false
includeUpdaterJson: true
tauriScript: npm run tauri
args: --bundles nsis
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ld-fdpi-windows-x64
path: |
src-tauri/target/release/bundle/nsis/*.exe
src-tauri/target/release/bundle/nsis/*.sig
version.json
if-no-files-found: error
- name: Verify installer exists
shell: pwsh
run: |
$files = Get-ChildItem "src-tauri/target/release/bundle/nsis" -Filter "*.exe"
if (-not $files) { throw "Installer not found" }
$files | ForEach-Object {
Write-Host "$($_.Name) $((Get-FileHash $_.FullName -Algorithm SHA256).Hash)"
}