diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7374f28..3e9e6c7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -133,10 +133,36 @@ jobs: path: | AdGuardHomeManager_${{ github.event.inputs.version }}_Linux_amd64.deb AdGuardHomeManager_${{ github.event.inputs.version }}_Linux.tar.gz + build-windows: + name: Build Windows installer + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - name: Decode .env + run: [IO.File]::WriteAllBytes('.env', [Convert]::FromBase64String('${{ secrets.ENV }}')) + - name: Update version in pubspec.yaml + run: (Get-Content pubspec.yaml) -replace '99.99.99+99', '${{ github.event.inputs.version }}' | Out-File -encoding ASCII pubspec.yaml + - name: Update version in innosetup config file + run: (Get-Content windows/innosetup_installer_builder.iss) -replace '', '${{ github.event.inputs.version }}' | Out-File -encoding ASCII windows/innosetup_installer_builder.iss + - uses: subosito/flutter-action@v2 + with: + channel: "stable" + - run: flutter clean + - run: flutter pub get + - run: flutter build windows --release + - name: Build installer witn innosetup + run: iscc /Q windows/innosetup_installer_builder.iss + - name: Move installer file to root directory + run: move build/windows/aghm_installer.exe AdGuardHomeManager_${{ github.event.inputs.version }}_Windows_x64.exe + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: windows + path: AdGuardHomeManager_${{ github.event.inputs.version }}_Windows_x64.exe release-builds-github: name: Release builds to GitHub runs-on: ubuntu-latest - needs: [build-android, build-macos, build-linux] + needs: [build-android, build-macos, build-linux, build-windows] steps: - uses: actions/checkout@v3 - name: Create builds directory @@ -156,6 +182,11 @@ jobs: with: name: linux path: releases/ + - name: Download Windows artifacts + uses: actions/download-artifact@v3 + with: + name: windows + path: releases/ - name: Release to GitHub uses: ncipollo/release-action@v1 with: diff --git a/windows/innosetup_installer_builder.iss b/windows/innosetup_installer_builder.iss index c818a3e..85c0798 100644 --- a/windows/innosetup_installer_builder.iss +++ b/windows/innosetup_installer_builder.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "AdGuard Home Manager" -#define MyAppVersion "2.3.2" +#define MyAppVersion "" #define MyAppPublisher "JGeek00" #define MyAppURL "https://github.com/JGeek00/adguard-home-manager" #define MyAppExeName "adguard_home_manager.exe"