Update app version to 0.6.2 #22
Workflow file for this run
This file contains 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 and Release Compose Desktop App with JetBrains JDK | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
# 1. Check out the source code | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
# 2. Set up JetBrains JDK | |
- name: Set up JetBrains JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'jetbrains' | |
java-version: '17' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# 3. Configure Gradle with cache | |
- name: Set up Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: '8.12' | |
# 4. Build the application | |
- name: Build with Gradle | |
run: ./gradlew packageDistributionForCurrentOS | |
# 5. Upload OS-specific artifacts | |
- name: Upload Linux artifact | |
if: matrix.os == 'ubuntu-latest' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-deb | |
path: kmplog-client/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: kmplog-client/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: kmplog-client/build/compose/binaries/main/msi/*.msi | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
contents: write # Nécessaire pour publier sur GitHub Release | |
steps: | |
# 1. Check out the source code | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
# 2. 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 | |
# 3. Vérifier la présence des fichiers téléchargés (optionnel mais recommandé pour le débogage) | |
- name: Check downloaded artifacts | |
run: ls -R | |
# 4. Create GitHub Release avec les patterns adaptés | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
*.deb | |
*.dmg | |
*.msi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |