Flocon/.github/workflows/release.yml
Florent CHAMPIGNY 8e3a8473a2
disabled job generate about libs (#100)
Co-authored-by: Florent Champigny <florent@bere.al>
2025-08-13 22:16:49 +02:00

103 lines
2.7 KiB
YAML

name: Build Desktop App then create a new release
on:
release:
types: [published]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, 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
env:
PROJECT_VERSION_NAME: ${{ github.ref_name }}
# Upload OS-specific artifacts
- name: Upload Linux artifact
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: linux-deb
path: FloconDesktop/composeApp/build/compose/binaries/main/deb/*.deb
- name: Upload macOS artifact
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: macos-dmg
path: FloconDesktop/composeApp/build/compose/binaries/main/dmg/*.dmg
- name: Upload Windows artifact
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: windows-msi
path: FloconDesktop/composeApp/build/compose/binaries/main/msi/*.msi
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout source
uses: actions/checkout@v4
# Download artifacts from all platforms
- name: Download Linux artifact
uses: actions/download-artifact@v4
with:
name: linux-deb
- name: Download macOS artifact
uses: actions/download-artifact@v4
with:
name: macos-dmg
- name: Download Windows artifact
uses: actions/download-artifact@v4
with:
name: windows-msi
# List downloaded artifacts
- name: Check downloaded artifacts
run: ls -R
# Create GitHub Release
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
*.deb
*.dmg
*.msi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}