Merge pull request #86 from anusii/av/add_onsubmit_custom_function #11
This file contains hidden or 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: Build Installers | |
| # 20241024 gjw Construct bundles for various distributions. The | |
| # bundles (as .zip and .exe files) are created as artefacts that can | |
| # be downloaded locally using the github command line `gh`. I am not | |
| # utilising github SECRETS yet but could do so to push the packages | |
| # directly to togaware.com. | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| env: | |
| APP: markdown_widget_builder | |
| FLUTTER_VERSION: '3.35.1' | |
| jobs: | |
| ######################################################################## | |
| # 20250110 gjw Originally I was building on Ubuntu 22.04 since my | |
| # 24.04 version would not run on Mint 21.3. Then moved even older to | |
| # Ubuntu 20.04 to get it more widely available. Seems to work on | |
| # 22.04 and 24.04. Backwards the error was: "rattle: | |
| # /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found | |
| # (required by rattle)" On Ubuntu 20.04 the highest version of GLIBC | |
| # is GLIBC2.30. | |
| # | |
| # 20250311 gjw Support for Ubuntu 20.04 is being deprecated | |
| # https://github.com/gjwgit/rattleng/actions/runs/13753262146. | |
| # Move to 22.04 to get broadest deployment. | |
| build-linux-zip: | |
| if: | | |
| contains(github.event.head_commit.message, 'bump version') || | |
| contains(github.event.head_commit.message, 'build installers') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone Repository | |
| uses: actions/checkout@v4 | |
| - name: Confirm Branch | |
| run: git status | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| architecture: x64 | |
| flutter-version: ${{env.FLUTTER_VERSION}} | |
| - name: Confirm Flutter Version | |
| run: flutter --version | |
| - name: Install OS Dependencies | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y ninja-build libgtk-3-dev | |
| sudo apt-get install -y clang cmake | |
| sudo apt-get install -y libunwind-dev libsecret-1-dev | |
| sudo apt-get install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio | |
| - name: Install Flutter Project Dependencies | |
| run: flutter pub get | |
| - name: Enable Linux Build | |
| run: flutter config --enable-linux-desktop | |
| - name: Build Artifact | |
| run: flutter build linux --release | |
| - name: Zip Bundle | |
| uses: thedoctor0/zip-release@master | |
| with: | |
| type: 'zip' | |
| filename: ${{ env.APP }}-${{ github.ref_name }}-linux.zip | |
| directory: build/linux/x64/release/bundle | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.APP }}-linux-zip | |
| path: build/linux/x64/release/bundle/${{ env.APP }}-${{ github.ref_name }}-linux.zip | |
| ######################################################################## | |
| build-windows-inno: | |
| if: | | |
| contains(github.event.head_commit.message, 'bump version') || | |
| contains(github.event.head_commit.message, 'build inno') || | |
| contains(github.event.head_commit.message, 'build installers') | |
| runs-on: windows-latest | |
| steps: | |
| - name: Clone Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| architecture: x64 | |
| flutter-version: ${{env.FLUTTER_VERSION}} | |
| - name: Install Project Dependencies | |
| run: flutter pub get | |
| - name: Enable Windows Build | |
| run: flutter config --enable-windows-desktop | |
| - name: Build Artifact | |
| run: flutter build windows | |
| - name: Check the DLLs for Inclusion in the .iss script | |
| run: dir D:\a\${{ env.APP }}\${{ env.APP }}\build\windows\x64\runner\Release\ | |
| - name: Get Version from pubspec.yaml | |
| run: | | |
| $version = (Get-Content pubspec.yaml | Select-String '^version:[^^]*' | ForEach-Object { $_.ToString().Split(":")[1].Trim().Split("+")[0].Trim() }) | |
| echo "APP_VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| - name: Compile .ISS to .EXE Installer | |
| # The github repo for the github action Minionguyjpro/Inno-Setup-Action@v1.2.5 | |
| # disappeared completely (user and repo). I found a recent fork from the | |
| # Wayback machine and forked it myself and that seems to | |
| # work as above. (gjw 20250403) | |
| # | |
| # Seems like it is now back. (gjw 20250423) | |
| # | |
| # uses: gjwgit/Inno-Setup-Action@v1.2.5 | |
| uses: Minionguyjpro/Inno-Setup-Action@v1.2.5 | |
| with: | |
| path: installers/app-windows.iss | |
| options: /O+ | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.APP }}-windows-inno | |
| path: D:\a\${{ env.APP }}\${{ env.APP }}\installers\installers\${{ env.APP }}-dev-windows-inno.exe | |
| ######################################################################## | |
| build-windows-zip: | |
| if: | | |
| contains(github.event.head_commit.message, 'bump version') || | |
| contains(github.event.head_commit.message, 'build installers') | |
| runs-on: windows-latest | |
| steps: | |
| - name: Clone Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| architecture: x64 | |
| flutter-version: ${{env.FLUTTER_VERSION}} | |
| - name: Install project dependencies | |
| run: flutter pub get | |
| - name: Generate intermediates | |
| run: flutter pub run build_runner build --delete-conflicting-outputs | |
| - name: Enable windows build | |
| run: flutter config --enable-windows-desktop | |
| - name: Build artifacts | |
| run: flutter build windows --release | |
| - name: Archive Release | |
| uses: thedoctor0/zip-release@master | |
| with: | |
| type: 'zip' | |
| filename: ${{ env.APP }}-${{github.ref_name}}-windows.zip | |
| directory: build/windows/x64/runner/Release | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.APP }}-windows-zip | |
| path: build/windows/x64/runner/Release/${{ env.APP }}-${{github.ref_name}}-windows.zip | |
| ######################################################################## | |
| build-macos-zip: | |
| if: | | |
| contains(github.event.head_commit.message, 'bump version') || | |
| contains(github.event.head_commit.message, 'build installers') | |
| runs-on: macos-latest | |
| steps: | |
| - name: Clone Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| architecture: x64 | |
| flutter-version: ${{env.FLUTTER_VERSION}} | |
| - name: Install Project Dependencies | |
| run: flutter pub get | |
| - name: Generate intermediates | |
| run: flutter pub run build_runner build --delete-conflicting-outputs | |
| - name: Enable macOS build | |
| run: flutter config --enable-macos-desktop | |
| - name: Build artifacts | |
| run: flutter build macos --release | |
| - name: Archive Release | |
| uses: thedoctor0/zip-release@master | |
| with: | |
| type: 'zip' | |
| directory: build/macos/Build/Products/Release | |
| path: ${{ env.APP }}.app | |
| filename: ${{ env.APP }}-${{github.ref_name}}-macos.zip | |
| - name: Review Bundle Contents | |
| run: ls -lh build/macos/Build/Products/Release | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.APP }}-macos-zip | |
| path: build/macos/Build/Products/Release/${{ env.APP }}-${{github.ref_name}}-macos.zip | |
| ######################################################################## | |
| # build-macos-dmg: | |
| # if: | | |
| # contains(github.event.head_commit.message, 'bump version') || | |
| # contains(github.event.head_commit.message, 'build installers') | |
| # runs-on: macos-latest | |
| # steps: | |
| # - name: Clone Repository | |
| # uses: actions/checkout@v4 | |
| # - name: Set up Flutter | |
| # uses: subosito/flutter-action@v2 | |
| # with: | |
| # channel: 'stable' | |
| # architecture: x64 | |
| # flutter-version: ${{env.FLUTTER_VERSION}} | |
| # - name: Install Project Dependencies | |
| # run: flutter pub get | |
| # - name: Generate intermediates | |
| # run: flutter pub run build_runner build --delete-conflicting-outputs | |
| # - name: Enable macOS build | |
| # run: flutter config --enable-macos-desktop | |
| # - name: Build artifacts | |
| # run: flutter build macos --release | |
| # - name: Archive Release | |
| # uses: thedoctor0/zip-release@master | |
| # with: | |
| # type: 'zip' | |
| # directory: build/macos/Build/Products/Release | |
| # path: ${{ env.APP }}.app | |
| # filename: ${{ env.APP }}-${{github.ref_name}}-macos.zip | |
| # - name: Review Bundle Contents | |
| # run: ls -lh build/macos/Build/Products/Release | |
| # - name: Upload Artifact | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: ${{ env.APP }}-macos-zip | |
| # path: build/macos/Build/Products/Release/${{ env.APP }}-${{github.ref_name}}-macos.zip | |
| # ######################################################################## | |
| # build-ios-zip: | |
| # if: | | |
| # contains(github.event.head_commit.message, 'bump version') || | |
| # contains(github.event.head_commit.message, 'build installers') | |
| # runs-on: macos-latest | |
| # steps: | |
| # - name: Clone Repository | |
| # uses: actions/checkout@v4 | |
| # - name: Set up Flutter | |
| # uses: subosito/flutter-action@v2 | |
| # with: | |
| # channel: 'stable' | |
| # architecture: x64 | |
| # flutter-version: ${{env.FLUTTER_VERSION}} | |
| # - name: Install Project Dependencies | |
| # run: flutter pub get | |
| # - name: Generate intermediates | |
| # run: flutter pub run build_runner build --delete-conflicting-outputs | |
| # - name: Enable macOS build | |
| # run: flutter config --enable-macos-desktop | |
| # - name: Build artifacts | |
| # run: flutter build ios --release --nocodesign | |
| # - name: Archive Release | |
| # uses: thedoctor0/zip-release@master | |
| # with: | |
| # type: 'zip' | |
| # directory: build/macos/Build/Products/Release | |
| # path: ${{ env.APP }}.app | |
| # filename: ${{ env.APP }}-${{github.ref_name}}-ios.zip | |
| # - name: Review Bundle Contents | |
| # run: ls -lh build/macos/Build/Products/Release | |
| # - name: Upload Artifact | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: ${{ env.APP }}-macos-zip | |
| # path: build/macos/Build/Products/Release/${{ env.APP }}-${{github.ref_name}}-macos.zip |