mirror of
https://github.com/openflocon/Flocon.git
synced 2026-05-19 22:15:03 +00:00
87 lines
No EOL
2.6 KiB
YAML
87 lines
No EOL
2.6 KiB
YAML
name: Build Desktop App
|
|
|
|
on:
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- os: macos-13 # runner Intel (x64)
|
|
arch: x64
|
|
jdk_url: "https://corretto.aws/downloads/latest/amazon-corretto-17-x64-macos-jdk.pkg"
|
|
- os: macos-latest
|
|
|
|
steps:
|
|
- name: Checkout source
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up temurin JDK
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '21'
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
- name: Set up Gradle
|
|
uses: gradle/gradle-build-action@v2
|
|
with:
|
|
gradle-version: '8.12'
|
|
|
|
- name: Generate aboutlibraries
|
|
working-directory: FloconDesktop
|
|
run: ./gradlew composeApp:exportLibraryDefinitions -PaboutLibraries.outputFile=src/commonMain/composeResources/files/aboutlibraries.json
|
|
|
|
- name: Build with Gradle
|
|
working-directory: FloconDesktop
|
|
run: ./gradlew packageDistributionForCurrentOS packageUberJarForCurrentOS
|
|
env:
|
|
PROJECT_VERSION_NAME: "1.0.0"
|
|
|
|
- name: Rename macOS arm64 dmg
|
|
if: matrix.os == 'macos-latest'
|
|
run: |
|
|
mv FloconDesktop/composeApp/build/compose/binaries/main/dmg/*.dmg FloconDesktop/composeApp/build/compose/binaries/main/dmg/macos-arm64.dmg
|
|
|
|
- name: Upload macOS arm64 artifact
|
|
if: matrix.os == 'macos-latest'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: macos-arm64-dmg
|
|
path: FloconDesktop/composeApp/build/compose/binaries/main/dmg/*.dmg
|
|
|
|
- name: Rename macOS x64 dmg
|
|
if: matrix.os == 'macos-13'
|
|
run: |
|
|
mv FloconDesktop/composeApp/build/compose/binaries/main/dmg/*.dmg FloconDesktop/composeApp/build/compose/binaries/main/dmg/macos-x64.dmg
|
|
|
|
- name: Upload macOS x64 artifact
|
|
if: matrix.os == 'macos-13'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: macos-x64-dmg
|
|
path: FloconDesktop/composeApp/build/compose/binaries/main/dmg/*.dmg
|
|
|
|
release:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout source
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download macOS artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: macos-arm64-dmg
|
|
|
|
- name: Download macOS artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: macos-x64-dmg |