-
Notifications
You must be signed in to change notification settings - Fork 0
157 lines (136 loc) · 6.43 KB
/
Copy pathrelease-windows-7.yml
File metadata and controls
157 lines (136 loc) · 6.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: release-windows-7.yml
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build-windows-7:
name: Build Windows 7
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.1.1' }
$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-win7.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-win7.exe"
} else {
Write-Warning "No NSIS setup found."
}
Get-ChildItem $releaseDir | Select-Object Name
- name: Test Windows 7 compatibility (artifact verification)
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
# Verify executable artifacts exist and have size > 0
$releaseDir = 'release'
$files = Get-ChildItem -Path $releaseDir -Filter *.exe -ErrorAction SilentlyContinue
if (-not $files -or $files.Length -eq 0) {
Write-Error "No executable artifacts found in $releaseDir. Build may have failed."
}
Write-Host "Found executable artifacts for Windows 7 compatibility:"
$files | ForEach-Object { Write-Host " - $($_.Name) ($($_.Length) bytes)" }
# Verify bootstrapper configuration is present for Windows 7
$confPath = '.\src-tauri\tauri.conf.json'
if (-not (Test-Path $confPath)) {
Write-Error "tauri.conf.json not found. Cannot verify Windows 7 embedBootstrapper setting."
}
$conf = Get-Content $confPath -Raw | ConvertFrom-Json
$mode = $conf.bundle.windows.webviewInstallMode.type
if ($mode -ne 'embedBootstrapper') {
Write-Error "tauri.conf.json webviewInstallMode is '$mode', expected 'embedBootstrapper' for Windows 7."
}
Write-Host "Windows 7 compatibility check passed: $mode is configured."
# Quick smoke-test: try to launch portable executable briefly (will exit quickly without display)
$portable = $files | Where-Object { $_.Name -like '*portable*' } | Select-Object -First 1
if ($portable) {
Write-Host "Smoke-testing portable executable ($($portable.Name))..."
try {
Start-Process -FilePath $portable.FullName -ArgumentList '--help' -WindowStyle Hidden -Wait -Timeout 15 -ErrorAction Stop
} catch {
Write-Host "Smoke-test completed (process exited or timed out as expected on headless runner)."
}
}
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: multimdreader-windows-7
if-no-files-found: error
path: |
release/multimdreader_*-portable-win7.exe
release/MultiMDReader_*-setup-win7.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-win7.exe` | Double-click to install & run |
| **Windows (64-bit, Portable)** | `multimdreader_*_x64-portable-win7.exe` | Just run the .exe — no install needed |
| **Windows (32-bit)** | `MultiMDReader_*_x86-setup-win7.exe` | Double-click to install & run |
| **Windows (32-bit, Portable)** | `multimdreader_*_x86-portable-win7.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-win7.exe
release/MultiMDReader_*-setup-win7.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}