Skip to content

Merge pull request #17 from Ayagikei/compose-desktop-1.7.0-beta02 #2

Merge pull request #17 from Ayagikei/compose-desktop-1.7.0-beta02

Merge pull request #17 from Ayagikei/compose-desktop-1.7.0-beta02 #2

Workflow file for this run

name: Build Compose Desktop App
on:
workflow_dispatch:
push:
tags:
- "v*"
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
target: linux
- os: windows-latest
target: windows
- os: macos-latest
target: macos-x64
gradle-args: "-Pcompose.desktop.mac.target=x64"
- os: macos-latest
target: macos-arm64
gradle-args: "-Pcompose.desktop.mac.target=arm64"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Grant execute permission for gradlew
if: runner.os != 'Windows'
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew packageDistributionForCurrentOS ${{ matrix.gradle-args }}
- name: Upload Windows artifact
if: matrix.target == 'windows'
uses: actions/upload-artifact@v3
with:
name: windows-distribution
path: build/compose/binaries/main/msi/*.msi
- name: Upload macOS x64 artifact
if: matrix.target == 'macos-x64'
uses: actions/upload-artifact@v3
with:
name: macos-x64-distribution
path: build/compose/binaries/main/dmg/*.dmg
- name: Upload macOS ARM64 artifact
if: matrix.target == 'macos-arm64'
uses: actions/upload-artifact@v3
with:
name: macos-arm64-distribution
path: build/compose/binaries/main/dmg/*.dmg
- name: Upload Linux artifact
if: matrix.target == 'linux'
uses: actions/upload-artifact@v3
with:
name: linux-distribution
path: build/compose/binaries/main/deb/*.deb
create-release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
path: artifacts
- name: Get version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}
name: Release ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: true
files: |
artifacts/windows-distribution/*.msi
artifacts/macos-x64-distribution/*.dmg
artifacts/macos-arm64-distribution/*.dmg
artifacts/linux-distribution/*.deb
body: |
## Compose Desktop Application Release ${{ steps.get_version.outputs.VERSION }}
### Downloads
- Windows: [.msi installer](artifacts/windows-distribution/*.msi)
- macOS Intel (x64): [.dmg image](artifacts/macos-x64-distribution/*.dmg)
- macOS Apple Silicon (ARM64): [.dmg image](artifacts/macos-arm64-distribution/*.dmg)
- Linux: [.deb package](artifacts/linux-distribution/*.deb)