-
Notifications
You must be signed in to change notification settings - Fork 11
65 lines (53 loc) · 1.71 KB
/
build-desktop.yml
File metadata and controls
65 lines (53 loc) · 1.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
name: Build Desktop JAR
on:
# Runs on PRs targeting the default branch
pull_request:
branches: [ "main" ]
paths:
- '.github/workflows/build-desktop.yml'
# Runs after merging to the default branch
push:
branches: [ "main" ]
tags:
- 'v*'
# Allows manual triggering from Actions tab
workflow_dispatch:
concurrency:
group: desktop-build-${{ github.ref }}
cancel-in-progress: true
jobs:
build-jar:
runs-on: macos-latest
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Need full history for git-version.gradle.kts
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
check-latest: true
- name: Setup Android SDK
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build Desktop JAR
run: ./gradlew :trailblaze-desktop:shrinkUberJar -Ptrailblaze.proguard=true
- name: Upload Desktop JAR
uses: actions/upload-artifact@v4
with:
name: trailblaze-desktop-jar
path: trailblaze-desktop/build/compose/jars-shrunk/trailblaze.jar
if-no-files-found: error
retention-days: 30
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2
with:
files: |
trailblaze-desktop/build/compose/jars-shrunk/trailblaze.jar
scripts/trailblaze
generate_release_notes: true