Files
TIS_RMS/.github/workflows/release.yml
T

62 lines
1.7 KiB
YAML

name: Build & Release Client (Windows & Android)
on:
push:
tags:
- 'v*' # Triggers whenever you push a tag like v1.0.0
workflow_dispatch: # Allows manual trigger from the GitHub Actions tab
jobs:
build-and-release:
name: Build Windows Installer & Android APK
runs-on: windows-latest
permissions:
contents: write # Grants permission to create GitHub Release
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Java (needed for Android if building APK)
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Install Inno Setup
run: choco install innosetup --no-progress
- name: Build Flutter Windows App
working-directory: frontend
run: |
flutter pub get
flutter build windows --release
- name: Compile Inno Setup Installer
run: |
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" frontend/TIS_RMS_Client.iss
- name: Build Flutter Android APK
working-directory: frontend
run: |
flutter build apk --release
copy build\app\outputs\flutter-apk\app-release.apk ..\installers\TIS_RMS_Client.apk
- name: Upload Artifacts to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
installers/TIS_RMS_Client_Setup.exe
installers/TIS_RMS_Client.apk
generate_release_notes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}