Skip to content

App: Set macOS application icon #8

App: Set macOS application icon

App: Set macOS application icon #8

Workflow file for this run

name: Build and Release Desktop App
# This workflow triggers only when you push a new tag (e.g., v1.0.0)
on:
push:
tags:
- 'v*.*.*'
# FIX 1: Add permissions for the release job to create a release.
permissions:
contents: write
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-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'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
./gradlew.bat packageMsi
elif [ "$RUNNER_OS" == "Linux" ]; then
./gradlew packageDeb
elif [ "$RUNNER_OS" == "macOS" ]; then
./gradlew packageDmg
fi
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ModernADB-${{ matrix.os }}
# FIX 2: Path now points to the directory containing the packages
path: composeApp/build/compose/binaries/main/
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all build artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create Release and Upload Assets
uses: softprops/action-gh-release@v2
with:
draft: true
name: Release ${{ github.ref_name }}
# FIX 3: This simplified glob pattern will find all package files
# inside their respective downloaded folders.
files: |
artifacts/ModernADB-windows-latest/msi/*.msi
artifacts/ModernADB-macos-latest/dmg/*.dmg
artifacts/ModernADB-ubuntu-latest/deb/*.deb