@@ -161,10 +161,14 @@ jobs:
161
161
path : packages/notedeck-${{ matrix.arch }}.dmg
162
162
163
163
windows-installer :
164
- name : Build Windows Installer
164
+ name : Windows Installer
165
165
runs-on : windows-latest
166
166
needs : windows-test
167
- if : github.ref_name == 'master'
167
+ strategy :
168
+ fail-fast : false
169
+ matrix :
170
+ arch : [x86_64, aarch64]
171
+
168
172
steps :
169
173
# Checkout the repository
170
174
- name : Checkout Code
@@ -178,19 +182,59 @@ jobs:
178
182
- name : Install Inno Setup
179
183
run : choco install innosetup --no-progress --yes
180
184
185
+ # Set up Rust toolchain
186
+ - name : Install Rust toolchain
187
+ run : rustup target add ${{ matrix.arch }}-pc-windows-msvc
188
+
189
+ # Build
190
+ - name : Build
191
+ shell : pwsh
192
+ run : |
193
+ $target = "${{ matrix.arch }}-pc-windows-msvc"
194
+ Write-Output "Building for target: $target"
195
+ cargo build --release --target=$target
196
+
197
+ # Generate ISS Script
198
+ - name : Generate Inno Setup Script
199
+ shell : pwsh
200
+ run : |
201
+ $arch = "${{ matrix.arch }}"
202
+ $issContent = @"
203
+ [Setup]
204
+ AppName=Damus Notedeck
205
+ AppVersion=0.1
206
+ DefaultDirName={pf}\Notedeck
207
+ DefaultGroupName=Damus Notedeck
208
+ OutputDir=..\packages\$arch
209
+ OutputBaseFilename=DamusNotedeckInstaller
210
+ Compression=lzma
211
+ SolidCompression=yes
212
+
213
+ [Files]
214
+ Source: "..\target\$arch-pc-windows-msvc\release\notedeck.exe"; DestDir: "{app}"; Flags: ignoreversion
215
+
216
+ [Icons]
217
+ Name: "{group}\Damus Notedeck"; Filename: "{app}\notedeck.exe"
218
+
219
+ [Run]
220
+ Filename: "{app}\notedeck.exe"; Description: "Launch Damus Notedeck"; Flags: nowait postinstall skipifsilent
221
+ "@
222
+ Set-Content -Path "scripts/windows-installer-$arch.iss" -Value $issContent
223
+
181
224
# Build Installer
182
225
- name : Run Inno Setup Script
183
226
run : |
184
- & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" "scripts\windows-installer.iss"
185
-
186
- # List outputs
187
- - name : List Inno Script outputs
188
- run : dir packages
227
+ & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" "scripts\windows-installer-${{ matrix.arch }}.iss"
189
228
229
+ # Move output
230
+ - name : Move Inno Script outputs to architecture-specific folder
231
+ run : |
232
+ New-Item -ItemType Directory -Force -Path packages\${{ matrix.arch }}
233
+ Move-Item -Path packages\${{ matrix.arch }}\DamusNotedeckInstaller.exe -Destination packages\${{ matrix.arch }}\DamusNotedeckInstaller.exe
190
234
# Upload the installer as an artifact
191
235
- name : Upload Installer
192
236
uses : actions/upload-artifact@v4
193
237
with :
194
- name : DamusNotedeckInstaller.exe
195
- path : packages\DamusNotedeckInstaller.exe
238
+ name : DamusNotedeckInstaller-${{ matrix.arch }} .exe
239
+ path : packages\${{ matrix.arch }}\ DamusNotedeckInstaller.exe
196
240
0 commit comments