@@ -43,13 +43,107 @@ jobs:
4343 with :
4444 name : signed-apk
4545 path : android/build/outputs/apk/release/android-release-unsigned-signed.apk
46- - name : Build cli JAR
47- run : bash ./gradlew :cli:createJar --stacktrace
48- - name : Upload cli JAR Artifact
46+
47+ cli-linux :
48+ name : Build CLI (Linux)
49+ runs-on : ubuntu-latest
50+ steps :
51+ - name : Checkout
52+ uses : actions/checkout@v4
53+ - name : Setup JDK
54+ uses : actions/setup-java@v4
55+ with :
56+ distribution : temurin
57+ java-version : " 17"
58+ - name : Set execution flag for gradlew
59+ run : chmod +x gradlew
60+ - name : Build Linux CLI binaries
61+ run : ./gradlew :cli:linkReleaseExecutableLinuxX64 :cli:linkReleaseExecutableLinuxArm64 --stacktrace
62+ - name : Package Linux x64 CLI
63+ run : |
64+ mkdir -p cli-linux-x64
65+ cp cli/build/bin/linuxX64/releaseExecutable/lcl.kexe cli-linux-x64/lcl
66+ chmod +x cli-linux-x64/lcl
67+ cd cli-linux-x64 && zip -r ../cli-linux-x64.zip lcl
68+ - name : Package Linux arm64 CLI
69+ run : |
70+ mkdir -p cli-linux-arm64
71+ cp cli/build/bin/linuxArm64/releaseExecutable/lcl.kexe cli-linux-arm64/lcl
72+ chmod +x cli-linux-arm64/lcl
73+ cd cli-linux-arm64 && zip -r ../cli-linux-arm64.zip lcl
74+ - name : Upload Linux x64 CLI Artifact
75+ uses : actions/upload-artifact@v4
76+ with :
77+ name : cli-linux-x64
78+ path : cli-linux-x64.zip
79+ - name : Upload Linux arm64 CLI Artifact
80+ uses : actions/upload-artifact@v4
81+ with :
82+ name : cli-linux-arm64
83+ path : cli-linux-arm64.zip
84+
85+ cli-macos :
86+ name : Build CLI (macOS)
87+ runs-on : macos-latest
88+ steps :
89+ - name : Checkout
90+ uses : actions/checkout@v4
91+ - name : Setup JDK
92+ uses : actions/setup-java@v4
93+ with :
94+ distribution : temurin
95+ java-version : " 17"
96+ - name : Set execution flag for gradlew
97+ run : chmod +x gradlew
98+ - name : Build macOS CLI binaries
99+ run : ./gradlew :cli:linkReleaseExecutableMacosX64 :cli:linkReleaseExecutableMacosArm64 --stacktrace
100+ - name : Package macOS x64 CLI
101+ run : |
102+ mkdir -p cli-macos-x64
103+ cp cli/build/bin/macosX64/releaseExecutable/lcl.kexe cli-macos-x64/lcl
104+ chmod +x cli-macos-x64/lcl
105+ cd cli-macos-x64 && zip -r ../cli-macos-x64.zip lcl
106+ - name : Package macOS arm64 CLI
107+ run : |
108+ mkdir -p cli-macos-arm64
109+ cp cli/build/bin/macosArm64/releaseExecutable/lcl.kexe cli-macos-arm64/lcl
110+ chmod +x cli-macos-arm64/lcl
111+ cd cli-macos-arm64 && zip -r ../cli-macos-arm64.zip lcl
112+ - name : Upload macOS x64 CLI Artifact
113+ uses : actions/upload-artifact@v4
114+ with :
115+ name : cli-macos-x64
116+ path : cli-macos-x64.zip
117+ - name : Upload macOS arm64 CLI Artifact
118+ uses : actions/upload-artifact@v4
119+ with :
120+ name : cli-macos-arm64
121+ path : cli-macos-arm64.zip
122+
123+ cli-windows :
124+ name : Build CLI (Windows)
125+ runs-on : windows-latest
126+ steps :
127+ - name : Checkout
128+ uses : actions/checkout@v4
129+ - name : Setup JDK
130+ uses : actions/setup-java@v4
131+ with :
132+ distribution : temurin
133+ java-version : " 17"
134+ - name : Build Windows CLI binary
135+ run : ./gradlew :cli:linkReleaseExecutableMingwX64 --stacktrace
136+ - name : Package Windows CLI
137+ run : |
138+ mkdir cli-windows-x64
139+ copy cli\build\bin\mingwX64\releaseExecutable\lcl.exe cli-windows-x64\lcl.exe
140+ Compress-Archive -Path cli-windows-x64\lcl.exe -DestinationPath cli-windows-x64.zip
141+ shell : pwsh
142+ - name : Upload Windows CLI Artifact
49143 uses : actions/upload-artifact@v4
50144 with :
51- name : cli-jar
52- path : cli/build/libs/linuxcommandlibrary.jar
145+ name : cli-windows-x64
146+ path : cli-windows-x64.zip
53147
54148 dmg :
55149 name : Generate DMG
@@ -204,7 +298,7 @@ jobs:
204298
205299 release :
206300 name : Release All Platforms
207- needs : [apk, dmg, msi, deb, rpm, appimage]
301+ needs : [apk, cli-linux, cli-macos, cli-windows, dmg, msi, deb, rpm, appimage]
208302 runs-on : ubuntu-latest
209303 steps :
210304 - name : Checkout
@@ -215,10 +309,30 @@ jobs:
215309 with :
216310 name : signed-apk
217311
218- - name : Download JAR Artifact
312+ - name : Download CLI Linux x64 Artifact
313+ uses : actions/download-artifact@v4.1.7
314+ with :
315+ name : cli-linux-x64
316+
317+ - name : Download CLI Linux arm64 Artifact
318+ uses : actions/download-artifact@v4.1.7
319+ with :
320+ name : cli-linux-arm64
321+
322+ - name : Download CLI macOS x64 Artifact
323+ uses : actions/download-artifact@v4.1.7
324+ with :
325+ name : cli-macos-x64
326+
327+ - name : Download CLI macOS arm64 Artifact
328+ uses : actions/download-artifact@v4.1.7
329+ with :
330+ name : cli-macos-arm64
331+
332+ - name : Download CLI Windows x64 Artifact
219333 uses : actions/download-artifact@v4.1.7
220334 with :
221- name : cli-jar
335+ name : cli-windows-x64
222336
223337 - name : Download DMG Artifact
224338 uses : actions/download-artifact@v4.1.7
@@ -291,15 +405,55 @@ jobs:
291405 asset_name : LinuxCommandLibrary-${{ steps.get_version.outputs.version }}-android.apk
292406 asset_content_type : application/zip
293407
294- - name : Upload JAR to Github Release
408+ - name : Upload CLI Linux x64 to Github Release
409+ uses : actions/upload-release-asset@v1.0.1
410+ env :
411+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
412+ with :
413+ upload_url : ${{ steps.create_release.outputs.upload_url }}
414+ asset_path : cli-linux-x64.zip
415+ asset_name : LinuxCommandLibrary-${{ steps.get_version.outputs.version }}-cli-linux-x64.zip
416+ asset_content_type : application/zip
417+
418+ - name : Upload CLI Linux arm64 to Github Release
295419 uses : actions/upload-release-asset@v1.0.1
296420 env :
297421 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
298422 with :
299423 upload_url : ${{ steps.create_release.outputs.upload_url }}
300- asset_path : linuxcommandlibrary.jar
301- asset_name : linuxcommandlibrary-${{ steps.get_version.outputs.version }}-cli.jar
302- asset_content_type : application/java-archive
424+ asset_path : cli-linux-arm64.zip
425+ asset_name : LinuxCommandLibrary-${{ steps.get_version.outputs.version }}-cli-linux-arm64.zip
426+ asset_content_type : application/zip
427+
428+ - name : Upload CLI macOS x64 to Github Release
429+ uses : actions/upload-release-asset@v1.0.1
430+ env :
431+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
432+ with :
433+ upload_url : ${{ steps.create_release.outputs.upload_url }}
434+ asset_path : cli-macos-x64.zip
435+ asset_name : LinuxCommandLibrary-${{ steps.get_version.outputs.version }}-cli-macos-x64.zip
436+ asset_content_type : application/zip
437+
438+ - name : Upload CLI macOS arm64 to Github Release
439+ uses : actions/upload-release-asset@v1.0.1
440+ env :
441+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
442+ with :
443+ upload_url : ${{ steps.create_release.outputs.upload_url }}
444+ asset_path : cli-macos-arm64.zip
445+ asset_name : LinuxCommandLibrary-${{ steps.get_version.outputs.version }}-cli-macos-arm64.zip
446+ asset_content_type : application/zip
447+
448+ - name : Upload CLI Windows x64 to Github Release
449+ uses : actions/upload-release-asset@v1.0.1
450+ env :
451+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
452+ with :
453+ upload_url : ${{ steps.create_release.outputs.upload_url }}
454+ asset_path : cli-windows-x64.zip
455+ asset_name : LinuxCommandLibrary-${{ steps.get_version.outputs.version }}-cli-windows-x64.zip
456+ asset_content_type : application/zip
303457
304458 - name : Upload DMG to Github Release
305459 uses : actions/upload-release-asset@v1.0.1
0 commit comments