Skip to content

release-windows.yml

release-windows.yml #8

name: release-windows.yml
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build-windows:
name: Build Windows
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Install frontend dependencies
run: npm install
- name: Build frontend
run: npm run build
- name: Generate Tauri icons
run: npx tauri icon public/icon.png
continue-on-error: true
- name: Install Tauri Rust dependencies
working-directory: src-tauri
run: cargo fetch
- name: Build Tauri app (Windows)
run: npx tauri build 2>&1
timeout-minutes: 30
- name: List build output
run: |
Get-ChildItem -Path "src-tauri\target\release\bundle" -Recurse -File -ErrorAction SilentlyContinue | Select-Object FullName
continue-on-error: true
- name: Rename artifacts (portable + setup)
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$tag = ${env:GITHUB_REF_NAME}
$ver = $tag -replace '^v',''
if (-not ($ver -match '^\d+\.\d+\.\d+')) { $ver = '0.0.7' }
$arch = 'x64'
$releaseDir = 'release'
New-Item -ItemType Directory -Force -Path $releaseDir | Out-Null
$targetDir = 'src-tauri\target\release'
# Portable
Copy-Item "$targetDir\multimdreader.exe" "$releaseDir\multimdreader_${ver}_${arch}-portable-win.exe"
# Setup (NSIS)
$setup = Get-ChildItem -Path "$targetDir\bundle\nsis" -Filter *.exe -ErrorAction SilentlyContinue | Select-Object -First 1
if ($setup) {
Copy-Item $setup.FullName "$releaseDir\MultiMDReader_${ver}_${arch}-setup-win.exe"
} else {
Write-Warning "No NSIS setup found."
}
Get-ChildItem $releaseDir | Select-Object Name
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: multimdreader-windows
if-no-files-found: error
path: |
release/multimdreader_*-portable-win.exe
release/MultiMDReader_*-setup-win.exe
retention-days: 30
- name: Create/Update GitHub Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: 'MultiMDReader ${{ github.ref_name }}'
body: |
## MultiMDReader ${{ github.ref_name }}
🔤 A cross-platform Markdown file reader. No installation required.
### 📥 Downloads
| Platform | File | Instructions |
|----------|------|-------------|
| **Windows (64-bit)** | `MultiMDReader_*_x64-setup-win.exe` | Double-click to install & run |
| **Windows (64-bit, Portable)** | `multimdreader_*_x64-portable-win.exe` | Just run the .exe — no install needed |
| **Windows (32-bit)** | `MultiMDReader_*_x86-setup-win.exe` | Double-click to install & run |
| **Windows (32-bit, Portable)** | `multimdreader_*_x86-portable-win.exe` | Just run the .exe — no install needed |
| **macOS (Intel)** | `MultiMDReader_*_x64.dmg` | Open .dmg → drag to Applications |
| **macOS (Apple Silicon)** | `MultiMDReader_*_aarch64.dmg` | Open .dmg → drag to Applications |
| **Linux (Debian/Ubuntu)** | `MultiMDReader_*_amd64.deb` | `sudo dpkg -i *.deb` |
| **Linux (All distros)** | `MultiMDReader_*_amd64.AppImage` | `chmod +x && ./MultiMDReader_*.AppImage` |
| **Linux (Arch)** | `multimdreader-*.pkg.tar.zst` | `sudo pacman -U *.pkg.tar.zst` |
### 🌐 Supported Languages
🇮🇹 Italiano · 🇬🇧 English (UK) · 🇺🇸 English (US) · 🇪🇸 Español · 🇩🇪 Deutsch · 🇫🇷 Français
---
Author: [PiBOH](https://piboh.github.io/) · Repository: [GitHub](https://github.com/PiBOH/multimdreader)
draft: false
prerelease: true
files: |
release/multimdreader_*-portable-win.exe
release/MultiMDReader_*-setup-win.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}