CI: Add GitHub Actions workflow for building desktop app #2
This file contains hidden or 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 Desktop App | |
| on: | |
| push: | |
| branches: [ main, cicd ] # Or whatever your main branch is | |
| pull_request: | |
| branches: [ main, cicd ] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| # Define the operating systems to build on | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' # A standard, full JDK | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v3 | |
| - name: Build with Gradle | |
| # This command will run the appropriate packaging task for the current OS | |
| run: ./gradlew packageRelease | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ModernADB-${{ matrix.os }} | |
| path: composeApp/build/compose/binaries/main/release/ |