Skip to content

.

. #40

name: build-windows-installer
on:
workflow_dispatch:
push:
branches: ["master"]
tags: ["v*"]
jobs:
build:
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install pixi (only)
uses: prefix-dev/setup-pixi@v0.9.3
with:
run-install: false
- name: Copy pixi into installer payload
shell: pwsh
run: |
New-Item -ItemType Directory -Force installer | Out-Null
$pixiPath = (Get-Command pixi).Source
Copy-Item $pixiPath -Destination installer/pixi.exe -Force
- name: Copy Git into installer payload
shell: pwsh
run: |
New-Item -ItemType Directory -Force installer\git | Out-Null
$gitExe = (Get-Command git).Source # ...\Git\cmd\git.exe
$gitRoot = Split-Path (Split-Path $gitExe -Parent) -Parent # ...\Git
Copy-Item "$gitRoot\*" -Destination installer\git -Recurse -Force
- name: Compile Inno Setup installer
uses: Minionguyjpro/Inno-Setup-Action@v1.2.7
with:
path: setup.iss
- name: Upload installer artifact
uses: actions/upload-artifact@v4
with:
name: windows-installer
path: dist/*.exe
- name: Attach installer to GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_type == 'tag' && github.ref_name || format('nightly-{0}', github.run_number) }}
target_commitish: ${{ github.sha }}
prerelease: ${{ github.ref_type != 'tag' }}
generate_release_notes: true
files: dist/*.exe