forked from fossasia/pslab-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
54 lines (47 loc) · 1.93 KB
/
Copy pathaction.yml
File metadata and controls
54 lines (47 loc) · 1.93 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
name: "Windows Workflow"
inputs:
VERSION_NAME:
description: 'Version Name to be used for build'
required: false
default: '1.0.0'
VERSION_CODE:
description: 'Version Code to be used for build'
required: true
default: '1'
runs:
using: "composite"
steps:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
cache: true
flutter-version-file: .flutter-version
- name: Build Windows App
shell: pwsh
run: |
flutter config --enable-windows-desktop
flutter build windows --build-name ${{ inputs.VERSION_NAME }} --build-number ${{ inputs.VERSION_CODE }}
- name: Build iss script
id: build-iss
shell: pwsh
run: |
# Update version in pubspec.yaml for iss script
(Get-Content pubspec.yaml) -replace '^version: .*', "version: ${{ inputs.VERSION_NAME }}+${{ inputs.VERSION_CODE }}" | Set-Content pubspec.yaml
dart run inno_bundle:build --no-app --release --no-installer
echo $(dart run inno_bundle:build --envs --no-hf) | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
- name: Build Installer
shell: pwsh
run: |
choco install innosetup --version=6.4.0 -y
$iscc = "${env:ProgramFiles(x86)}\Inno Setup 6\iscc.exe"
# Remove missing Icelandic language include if present to avoid build failure
$issPath = "build\windows\x64\installer\Release\inno-script.iss"
if (Test-Path $issPath) {
(Get-Content $issPath) | Where-Object { $_ -notmatch 'Icelandic\.isl' } | Set-Content $issPath
}
& "$iscc" /O+ "build\windows\x64\installer\Release\inno-script.iss"
- name: Store Installer
uses: actions/upload-artifact@v4
with:
name: windows-installer
path: build/windows/x64/installer/Release/${{ steps.build-iss.outputs.APP_NAME_CAMEL_CASE }}-x86_64-${{ steps.build-iss.outputs.APP_VERSION }}-Installer.exe