mirror of
https://github.com/ovrport/app.git
synced 2026-10-27 03:19:56 -04:00
* Add GitHub Actions workflow for building Android and Desktop * Add workflow for building native deb and jar file * Fix line indentation * Change target formats --------- Co-authored-by: Pablo García Santamaría <69808296+PGSCOM@users.noreply.github.com> Co-authored-by: Mathew Tkachuk <me@crx.moe>
102 lines
2.4 KiB
YAML
102 lines
2.4 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-android:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
cache: gradle
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
|
|
- name: Build Android APK
|
|
run: ./gradlew :composeApp:assembleRelease
|
|
|
|
- name: Upload Android APK
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: android-apk
|
|
path: composeApp/build/outputs/apk/release/*.apk
|
|
retention-days: 30
|
|
|
|
build-desktop-windows:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
cache: gradle
|
|
|
|
- name: Build Desktop package
|
|
run: ./gradlew :composeApp:packageReleaseDistributionForCurrentOS
|
|
shell: bash
|
|
|
|
- name: Upload Desktop artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: desktop-windows
|
|
path: composeApp/build/compose/binaries/main-release/**/*
|
|
retention-days: 30
|
|
|
|
build-desktop-linux:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
cache: gradle
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
|
|
- name: Build Desktop package
|
|
run: ./gradlew :composeApp:packageReleaseDistributionForCurrentOS
|
|
shell: bash
|
|
|
|
- name: Build JAR package
|
|
run: ./gradlew :composeApp:packageUberJarForCurrentOS
|
|
shell: bash
|
|
|
|
- name: Upload Desktop artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: desktop-linux
|
|
path: composeApp/build/compose/binaries/main-release/**/*
|
|
retention-days: 30
|
|
|
|
- name: Upload JAR artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: desktop-jar
|
|
path: composeApp/build/compose/jars/*
|
|
retention-days: 30
|
|
|