-
-
Notifications
You must be signed in to change notification settings - Fork 6
93 lines (81 loc) · 2.71 KB
/
build-desktop.yml
File metadata and controls
93 lines (81 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Build Desktop Distributions
on:
push:
tags:
- 'v*' # Runs on version tags like v1.0.0
jobs:
build:
name: Build for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
format: macos-arm
gradle_task: packageReleaseDistributionForCurrentOS
arch: arm
- os: macos-latest
format: macos-intel
gradle_task: packageReleaseDistributionForCurrentOS
arch: intel
- os: windows-latest
format: windows
gradle_task: packageReleaseDistributionForCurrentOS
- os: ubuntu-latest
format: linux
gradle_task: packageReleaseDistributionForCurrentOS
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Grant execute permission for Gradlew
if: runner.os != 'Windows'
run: chmod +x gradlew
- name: Build native packages
run: ./gradlew ${{ matrix.gradle_task }} packageUberJarForCurrentOS --stacktrace
- name: Check build output
run: ls -R composeApp/build || true
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.format }}
path: |
composeApp/build/compose/binaries/**/dmg/*
# composeApp/build/compose/binaries/**/pkg/*
composeApp/build/compose/binaries/**/deb/*
composeApp/build/compose/binaries/**/msi/*
# composeApp/build/compose/jars/*.jar
# composeApp/build/compose/binaries/**/app/*
release:
name: Create GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: List downloaded files
run: ls -R ./artifacts
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/build-macos/**/*.dmg
artifacts/build-macos/**/*.app
artifacts/build-macos/**/*.pkg
artifacts/build-macos/**/*.jar
artifacts/build-windows/**/*.msi
artifacts/build-windows/**/*.exe
artifacts/build-windows/**/*.jar
artifacts/build-linux/**/*.deb
artifacts/build-linux/**/*.rpm
artifacts/build-linux/**/*.jar
draft: true
tag_name: ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}