Update window_release.yml #5
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
name: Window Installer | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: "12.x" | |
cache: 'gradle' | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: "3.10.2" | |
channel: 'stable' | |
cache: true | |
- name: Get dependencies | |
run: flutter --disable-telemetry && flutter pub get && flutter doctor || true | |
- name: Get dependencies example app | |
working-directory: example | |
run: flutter pub get | |
- name: Install NSIS | |
run: choco install nsis -y # If using Chocolatey, or use an alternative method to install NSIS | |
- name: Start build | |
working-directory: example | |
run: flutter build windows | |
- name: Create Installer | |
run: | | |
set -e | |
cp path/to/your/app.exe app.exe | |
cp path/to/your/installer.nsi installer.nsi | |
makensis installer.nsi | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: app | |
path: | | |
build/windows/ | |
app.exe | |
FlutterM3Core.exe | |
# | |
# - name: Upload a Build Artifact | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: Window - Release | |
# path: example/build/outputs/windows/Release/example.exe |