Build Windows (.exe) #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bundle the app to exe installer (usually no need to use this workflow) | |
name: Build Windows (.exe) | |
"on": | |
workflow_dispatch: | |
inputs: | |
flutterChannel: | |
description: "Flutter channel" | |
default: stable | |
required: true | |
type: choice | |
options: | |
- stable | |
- beta | |
- master | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: ${{ inputs.flutterChannel }} | |
- name: Flutter build for Windows | |
run: | | |
flutter pub get | |
flutter build windows | |
- name: Clone vcredist files | |
run: | | |
git clone https://github.com/iiumschedule/vcredist.git windows-x64-vc | |
- name: Add DLL files | |
run: | | |
Copy-Item windows-x64-vc/scripts/windows/x64/msvcp140.dll build/windows/runner/Release/ | |
Copy-Item windows-x64-vc/scripts/windows/x64/vcruntime140.dll build/windows/runner/Release/ | |
Copy-Item windows-x64-vc/scripts/windows/x64/vcruntime140_1.dll build/windows/runner/Release/ | |
- name: Building the installer | |
run: | | |
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "Inno\setup-script.iss" | |
shell: cmd | |
- name: Upload the installer as an artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: "Inno/iiumschedulesetup.exe" | |
- name: Write summary | |
run: | | |
echo "Build setup" | |
echo ":blue_heart: Using **Flutter ${{ inputs.flutterChannel }}**" >> $GITHUB_STEP_SUMMARY |