-
Notifications
You must be signed in to change notification settings - Fork 24
65 lines (56 loc) · 2 KB
/
build-win-installer.yaml
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
name: Build Windows Installer
on: workflow_dispatch
jobs:
build:
name: Build the Inno Setup Installer
runs-on: windows-latest
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Remove extra header in git config
run: |
git config --unset "http.https://github.com/.extraheader"
- id: commit
uses: prompt/actions-commit-hash@v3
- name: Install extra language file of Inno Setup 6
run: |
$baseUri = 'https://raw.github.com/jrsoftware/issrc/main/Files'
$downloadDir = "$env:ProgramFiles (x86)\Inno Setup 6\Languages"
$files = @(
@{
Uri = "$baseUri/Languages/Unofficial/ChineseTraditional.isl"
OutFile = "$downloadDir\ChineseTraditional.isl"
},
@{
Uri = "$baseUri/Languages/Unofficial/ChineseSimplified.isl"
OutFile = "$downloadDir\ChineseSimplified.isl"
}
)
$jobs = @()
New-Item -ItemType Directory -Path $downloadDir -Force
foreach ($file in $files) {
$jobs += Start-ThreadJob -Name $file.OutFile -ScriptBlock {
$params = $using:file
Invoke-WebRequest @params
}
}
Write-Host "Downloads started..."
Wait-Job -Job $jobs
foreach ($job in $jobs) {
Receive-Job -Job $job
}
- name: Compile .ISS to .EXE installer
uses: Minionguyjpro/[email protected]
with:
path: scripts/windows-setup-files/kuwa_genai_os.iss
options: /O+
- name: Export the installer
uses: actions/upload-artifact@v4
with:
name: Kuwa-GenAI-OS-${{ github.ref_name }}${{ steps.commit.outputs.short }}
path: D:\a\genai-os\genai-os\scripts\windows-setup-files\Kuwa-GenAI-OS.exe