Skip to content

Commit 7463733

Browse files
committed
chore: Refine desktop build workflow and artifact paths
This commit refactors the `build-desktop.yml` GitHub Actions workflow to streamline the build process and improve artifact handling. The macOS build matrix has been updated to use `macos-13` for Intel builds, removing the need for a manual JDK installation. Additionally, the artifact upload paths have been refined to only include specific package formats (`.dmg`, `.deb`, `.msi`), ensuring that only final distributable files are archived. ### Key Changes: * **Build Matrix (`build-desktop.yml`):** * Updated the macOS Intel build to run on `os: macos-13`, which natively supports x64 architecture. * Removed the manual download and setup of an Intel JDK, simplifying the workflow steps. * Added descriptive comments for each operating system in the build matrix. * **Artifact Paths:** * The `actions/upload-artifact` step now uses more specific path patterns to upload only `.dmg`, `.deb`, and `.msi` packages. * Paths for `.pkg`, `.jar`, and raw `.app` directories have been commented out to exclude them from the final build artifacts. * **Minor Refinements:** * Renamed the "Make gradlew executable" step to "Grant execute permission for Gradlew" for clarity.
1 parent 091b099 commit 7463733

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

.github/workflows/build-desktop.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,22 @@ jobs:
1212
strategy:
1313
matrix:
1414
include:
15+
# macOS ARM (Apple Silicon)
1516
- os: macos-latest
1617
format: macos-arm
1718
gradle_task: packageReleaseDistributionForCurrentOS
18-
arch: arm
19-
- os: macos-latest
19+
20+
# macOS Intel (x64)
21+
- os: macos-13
2022
format: macos-intel
2123
gradle_task: packageReleaseDistributionForCurrentOS
22-
arch: intel
24+
25+
# Windows
2326
- os: windows-latest
2427
format: windows
2528
gradle_task: packageReleaseDistributionForCurrentOS
29+
30+
# Linux
2631
- os: ubuntu-latest
2732
format: linux
2833
gradle_task: packageReleaseDistributionForCurrentOS
@@ -31,22 +36,14 @@ jobs:
3136
- name: Checkout code
3237
uses: actions/checkout@v4
3338

34-
- name: Setup ARM JDK (default)
35-
if: matrix.arch == 'arm'
39+
- name: Setup JDK 17
3640
uses: actions/setup-java@v4
3741
with:
3842
distribution: 'temurin'
3943
java-version: '17'
4044

41-
- name: Install Intel (x86_64) JDK manually
42-
if: matrix.arch == 'intel'
43-
run: |
44-
curl -L -o intel-jdk.tar.gz https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11+9/OpenJDK17U-jdk_x64_mac_hotspot_17.0.11_9.tar.gz
45-
mkdir -p $HOME/intel-jdk
46-
tar -xzf intel-jdk.tar.gz -C $HOME/intel-jdk --strip-components=1
47-
echo "JAVA_HOME=$HOME/intel-jdk" >> $GITHUB_ENV
48-
49-
- name: Make gradlew executable
45+
- name: Grant execute permission for Gradlew
46+
if: runner.os != 'Windows'
5047
run: chmod +x gradlew
5148

5249
- name: Build native packages
@@ -56,7 +53,13 @@ jobs:
5653
uses: actions/upload-artifact@v4
5754
with:
5855
name: build-${{ matrix.format }}
59-
path: composeApp/build/compose/binaries/**/*
56+
path: |
57+
composeApp/build/compose/binaries/**/dmg/*
58+
composeApp/build/compose/binaries/**/deb/*
59+
composeApp/build/compose/binaries/**/msi/*
60+
# composeApp/build/compose/binaries/**/pkg/*
61+
# composeApp/build/compose/jars/*.jar
62+
# composeApp/build/compose/binaries/**/app/*
6063

6164
release:
6265
name: Create GitHub Release

0 commit comments

Comments
 (0)