Merge pull request #108 from ai94iq/feat/windows-installer

This commit is contained in:
Tobi Lutke
2026-11-25 09:52:13 -05:00
7 changed files with 196 additions and 4 deletions
+25
View File
@@ -117,6 +117,18 @@ jobs:
throw "disktree.exe has no embedded icon"
}
# Here rather than only at release time, so a broken installer script
# fails the pull request instead of a release half-way through.
- name: Installer
shell: pwsh
run: |
packaging/windows/install-inno.ps1 -Dir "$env:RUNNER_TEMP\inno"
& "$env:RUNNER_TEMP\inno\ISCC.exe" /Q /DAppVersion=0.0.0 `
/DArch=x86_64 packaging/windows/disktree.iss
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
packaging/windows/check-setup.ps1 `
-Setup target/bundle/disktree-0.0.0-x86_64-windows-setup.exe
# The other half of each release: the same tests on the architectures
# the release builds for but the jobs above do not run on.
other-architectures:
@@ -152,3 +164,16 @@ jobs:
- name: Test
run: cargo xtask test
# The Arm64 setup, which no other job builds before a release does.
- name: Installer
if: runner.os == 'Windows'
shell: pwsh
run: |
cargo build --release --locked -p disktree-app
packaging/windows/install-inno.ps1 -Dir "$env:RUNNER_TEMP\inno"
& "$env:RUNNER_TEMP\inno\ISCC.exe" /Q /DAppVersion=0.0.0 `
/DArch=aarch64 packaging/windows/disktree.iss
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
packaging/windows/check-setup.ps1 `
-Setup target/bundle/disktree-0.0.0-aarch64-windows-setup.exe
+23 -1
View File
@@ -252,13 +252,35 @@ jobs:
[IO.File]::WriteAllText("dist/$name.zip.sha256", "$hash $name.zip`n")
"archive=dist/$name.zip" >> $env:GITHUB_OUTPUT
- name: Install Inno Setup
shell: pwsh
run: packaging/windows/install-inno.ps1 -Dir "$env:RUNNER_TEMP\inno"
- name: Installer
id: installer
shell: pwsh
env:
VERSION: ${{ needs.release.outputs.version }}
ARCH: ${{ matrix.arch }}
run: |
ISCC.exe /Q "/DAppVersion=$env:VERSION" "/DArch=$env:ARCH" `
packaging/windows/disktree.iss
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
$name = "disktree-$env:VERSION-$env:ARCH-windows-setup.exe"
$hash = (Get-FileHash "target/bundle/$name" -Algorithm SHA256).Hash.ToLower()
[IO.File]::WriteAllText("target/bundle/$name.sha256", "$hash $name`n")
"setup=target/bundle/$name" >> $env:GITHUB_OUTPUT
- name: Upload
shell: bash
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ needs.release.outputs.tag }}
ARCHIVE: ${{ steps.package.outputs.archive }}
run: gh release upload "$TAG" "$ARCHIVE" "$ARCHIVE.sha256" --clobber
SETUP: ${{ steps.installer.outputs.setup }}
run: |
gh release upload "$TAG" "$ARCHIVE" "$ARCHIVE.sha256" \
"$SETUP" "$SETUP.sha256" --clobber
publish:
name: Publish