|
57 | 57 | - name: Build Android APK (debug) |
58 | 58 | run: flutter build apk --debug --no-shrink |
59 | 59 |
|
| 60 | + - name: Upload Android APK artifact |
| 61 | + uses: actions/upload-artifact@v4 |
| 62 | + with: |
| 63 | + name: android-apk-debug |
| 64 | + path: build/app/outputs/flutter-apk/app-debug.apk |
| 65 | + retention-days: 7 |
| 66 | + |
| 67 | + build-linux: |
| 68 | + name: Build Linux |
| 69 | + runs-on: ubuntu-latest |
| 70 | + needs: analyze |
| 71 | + |
| 72 | + steps: |
| 73 | + - name: Checkout code |
| 74 | + uses: actions/checkout@v6 |
| 75 | + |
| 76 | + - name: Setup Flutter |
| 77 | + uses: subosito/flutter-action@v2 |
| 78 | + with: |
| 79 | + flutter-version: "3.38.5" |
| 80 | + channel: "stable" |
| 81 | + cache: true |
| 82 | + |
| 83 | + - name: Install Linux build dependencies |
| 84 | + run: | |
| 85 | + sudo apt-get update |
| 86 | + sudo apt-get install -y \ |
| 87 | + clang \ |
| 88 | + cmake \ |
| 89 | + ninja-build \ |
| 90 | + pkg-config \ |
| 91 | + libgtk-3-dev \ |
| 92 | + liblzma-dev \ |
| 93 | + libstdc++-12-dev \ |
| 94 | + rpm \ |
| 95 | + dpkg-dev |
| 96 | +
|
| 97 | + - name: Build Linux installers |
| 98 | + run: | |
| 99 | + chmod +x ./installer/linux/build.sh |
| 100 | + ./installer/linux/build.sh |
| 101 | +
|
| 102 | + - name: Upload Linux .deb artifact |
| 103 | + uses: actions/upload-artifact@v4 |
| 104 | + with: |
| 105 | + name: linux-deb-installer |
| 106 | + path: dist/linux/x64/*.deb |
| 107 | + retention-days: 7 |
| 108 | + |
| 109 | + - name: Upload Linux .rpm artifact |
| 110 | + uses: actions/upload-artifact@v4 |
| 111 | + with: |
| 112 | + name: linux-rpm-installer |
| 113 | + path: dist/linux/x64/*.rpm |
| 114 | + retention-days: 7 |
| 115 | + |
60 | 116 | build-web: |
61 | 117 | name: Build Web |
62 | 118 | runs-on: ubuntu-latest |
@@ -102,22 +158,33 @@ jobs: |
102 | 158 | channel: "stable" |
103 | 159 | cache: true |
104 | 160 |
|
105 | | - - name: Get dependencies |
106 | | - run: flutter pub get |
| 161 | + - name: Install WiX Toolset |
| 162 | + run: | |
| 163 | + choco install wixtoolset -y |
| 164 | + $env:PATH += ";C:\Program Files (x86)\WiX Toolset v3.14\bin" |
| 165 | + echo "C:\Program Files (x86)\WiX Toolset v3.14\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
| 166 | +
|
| 167 | + - name: Build Windows installer |
| 168 | + run: .\installer\windows\build.ps1 |
107 | 169 |
|
108 | | - - name: Build Windows |
109 | | - run: flutter build windows --release |
| 170 | + - name: Upload Windows MSI artifact |
| 171 | + uses: actions/upload-artifact@v4 |
| 172 | + with: |
| 173 | + name: windows-msi-installer |
| 174 | + path: dist/windows/x64/*.msi |
| 175 | + retention-days: 7 |
110 | 176 |
|
111 | 177 | status-check: |
112 | 178 | name: All Builds Status |
113 | 179 | runs-on: ubuntu-latest |
114 | | - needs: [build-android, build-web, build-windows] |
| 180 | + needs: [build-android, build-linux, build-web, build-windows] |
115 | 181 | if: always() |
116 | 182 |
|
117 | 183 | steps: |
118 | 184 | - name: Check build status |
119 | 185 | run: | |
120 | 186 | if [ "${{ needs.build-android.result }}" != "success" ] || \ |
| 187 | + [ "${{ needs.build-linux.result }}" != "success" ] || \ |
121 | 188 | [ "${{ needs.build-web.result }}" != "success" ] || \ |
122 | 189 | [ "${{ needs.build-windows.result }}" != "success" ]; then |
123 | 190 | echo "Some builds failed!" |
|
0 commit comments