Merge pull request #806 from gjwgit/kev/805_setting_place_random_seed… #271
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: 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: | |
FLUTTER_VERSION: '3.27.0' | |
jobs: | |
######################################################################## | |
# 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. | |
build-linux-zip: | |
if: | | |
contains(github.event.head_commit.message, 'bump version') || | |
contains(github.event.head_commit.message, 'build installers') | |
runs-on: ubuntu-20.04 | |
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 | |
- 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: rattle-${{ github.ref_name }}-linux.zip | |
directory: build/linux/x64/release/bundle | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rattle-linux-zip | |
path: build/linux/x64/release/bundle/rattle-${{ github.ref_name }}-linux.zip | |
######################################################################## | |
build-windows-inno: | |
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: 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\rattleng\rattleng\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 | |
uses: Minionguyjpro/[email protected] | |
with: | |
path: installers/rattle-windows.iss | |
options: /O+ | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rattle-windows-inno | |
path: D:\a\rattleng\rattleng\installers\installers\rattle-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: rattle-${{github.ref_name}}-windows.zip | |
directory: build/windows/x64/runner/Release | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rattle-windows-zip | |
path: build/windows/x64/runner/Release/rattle-${{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: rattle.app | |
filename: rattle-${{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: rattle-macos-zip | |
path: build/macos/Build/Products/Release/rattle-${{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: rattle.app | |
# filename: rattle-${{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: rattle-macos-zip | |
# path: build/macos/Build/Products/Release/rattle-${{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: rattle.app | |
# filename: rattle-${{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: rattle-macos-zip | |
# path: build/macos/Build/Products/Release/rattle-${{github.ref_name}}-macos.zip |