Skip to content

add icon&workflow, and small fix (#2) #1

add icon&workflow, and small fix (#2)

add icon&workflow, and small fix (#2) #1

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
build-and-release:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build app and NSIS installer
run: pnpm package:win
- name: Collect release artifacts
shell: pwsh
run: |
New-Item -ItemType Directory -Path release-assets -Force | Out-Null
$mainExe = Get-ChildItem -Path "src-tauri/target/release" -Filter "*.exe" -File |
Where-Object { $_.DirectoryName -notmatch "\\build\\|\\deps\\|\\examples\\" } |
Select-Object -First 1
if (-not $mainExe) {
throw "Main executable not found in src-tauri/target/release"
}
Copy-Item $mainExe.FullName -Destination "release-assets/"
$installer = Get-ChildItem -Path "src-tauri/target/release/bundle/nsis" -Filter "*-setup.exe" -File |
Sort-Object LastWriteTime -Descending |
Select-Object -First 1
if (-not $installer) {
throw "NSIS installer not found in src-tauri/target/release/bundle/nsis"
}
Copy-Item $installer.FullName -Destination "release-assets/"
- name: Create GitHub release and upload assets
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
release-assets/*.exe