Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 67 additions & 12 deletions .github/workflows/dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
# Manual triggers
workflow_dispatch:
inputs:
upload_apk:
description: 'Upload APK to GitHub Actions'
upload_build:
description: 'Upload Build to GitHub Actions'
required: false
default: 'false'
repo_branch:
Expand All @@ -17,11 +17,11 @@ on:
default: 'development'

env:
JAVA_VERSION: 21
JAVA_VERSION: 25
JAVA_DISTRO: 'temurin'

jobs:
build-app:
android-app:
runs-on: macos-latest
permissions:
contents: write
Expand All @@ -45,8 +45,8 @@ jobs:
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v6.3.0

- name: Set up JDK 21
uses: actions/setup-java@v5
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v6
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
Expand All @@ -73,44 +73,99 @@ jobs:
cp app/build/outputs/mapping/ci/mapping.txt fga-ci-${{ env.COMMIT_COUNT }}-mapping.txt

- name: Upload Mapping
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_apk == 'true' || github.event.inputs.upload_apk == true) }}
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_build == 'true' || github.event.inputs.upload_build == true) }}
uses: actions/upload-artifact@v7
with:
name: fga-ci-${{ env.COMMIT_COUNT }}-mapping
path: fga-ci-${{ env.COMMIT_COUNT }}-mapping.txt

- name: Upload APK
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_apk == 'true' || github.event.inputs.upload_apk == true) }}
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_build == 'true' || github.event.inputs.upload_build == true) }}
uses: actions/upload-artifact@v7
with:
name: fga-ci-${{ env.COMMIT_COUNT }}-apk
path: fga-ci-${{ env.COMMIT_COUNT }}.apk

- name: Upload APK (arm64-v8a)
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_apk == 'true' || github.event.inputs.upload_apk == true) }}
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_build == 'true' || github.event.inputs.upload_build == true) }}
uses: actions/upload-artifact@v7
with:
name: fga-ci-arm64-v8a-${{ env.COMMIT_COUNT }}-apk
path: fga-ci-arm64-v8a-${{ env.COMMIT_COUNT }}.apk

- name: Upload APK (armeabi-v7a)
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_apk == 'true' || github.event.inputs.upload_apk == true) }}
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_build == 'true' || github.event.inputs.upload_build == true) }}
uses: actions/upload-artifact@v7
with:
name: fga-ci-armeabi-v7a-${{ env.COMMIT_COUNT }}-apk
path: fga-ci-armeabi-v7a-${{ env.COMMIT_COUNT }}.apk

- name: Upload APK (x86_64)
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_apk == 'true' || github.event.inputs.upload_apk == true) }}
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_build == 'true' || github.event.inputs.upload_build == true) }}
uses: actions/upload-artifact@v7
with:
name: fga-ci-x86_64-${{ env.COMMIT_COUNT }}-apk
path: fga-ci-x86_64-${{ env.COMMIT_COUNT }}.apk

- name: Upload APK (x86)
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_apk == 'true' || github.event.inputs.upload_apk == true) }}
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_build == 'true' || github.event.inputs.upload_build == true) }}
uses: actions/upload-artifact@v7
with:
name: fga-ci-x86-${{ env.COMMIT_COUNT }}-apk
path: fga-ci-x86-${{ env.COMMIT_COUNT }}.apk

Desktop-App:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
permissions:
contents: write
discussions: write
env:
COMMIT_COUNT: 0
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
repository: 'ArthurKun21/FGA-Preview'
token: ${{ secrets.PAT }}
ref: ${{ github.event.inputs.repo_branch || 'development' }}

- name: Prepare build (macos/ubuntu)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: |
commit_count=$(git rev-list --count HEAD)
echo "COMMIT_COUNT=$commit_count" >> $GITHUB_ENV

- name: Prepare build (windows)
if: matrix.os == 'windows-latest'
run: |
$commit_count = git rev-list --count HEAD
"COMMIT_COUNT=$commit_count" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v6.3.0

- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v6
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}

- name: Set up gradle
uses: gradle/actions/setup-gradle@v6.3.0

- name: Build Desktop Release for ${{ matrix.os }}
run: |
./gradlew :DesktopApp:packageReleaseDistributionForCurrentOS

- name: Upload ${{ matrix.os }} Build
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_build == 'true' || github.event.inputs.upload_build == true) }}
uses: actions/upload-artifact@v7
with:
name: fga-ci-${{ matrix.os }}-desktop-${{ env.COMMIT_COUNT }}
path: ./desktopApp/build/compose/binaries/main-release/