Skip to content

Commit ad56a0c

Browse files
committed
Add appimage
1 parent 5797579 commit ad56a0c

1 file changed

Lines changed: 43 additions & 4 deletions

File tree

.github/workflows/android.yml

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,30 @@ jobs:
109109
name: deb
110110
path: desktopApp/build/compose/binaries/main/deb/*.deb
111111

112+
appimage:
113+
name: Generate AppImage
114+
runs-on: ubuntu-latest
115+
steps:
116+
- name: Checkout
117+
uses: actions/checkout@v4
118+
- name: Setup JDK
119+
uses: actions/setup-java@v4
120+
with:
121+
distribution: temurin
122+
java-version: "17"
123+
- name: Set execution flag for gradlew
124+
run: chmod +x gradlew
125+
- name: Build AppImage
126+
run: ./gradlew :desktopApp:packageAppImage
127+
- name: Upload AppImage Artifact
128+
uses: actions/upload-artifact@v4
129+
with:
130+
name: appimage
131+
path: desktopApp/build/compose/binaries/main/app-image/*.AppImage
132+
112133
release:
113134
name: Release All Platforms
114-
needs: [apk, dmg, msi, deb]
135+
needs: [apk, dmg, msi, deb, appimage]
115136
runs-on: ubuntu-latest
116137
steps:
117138
- name: Checkout
@@ -141,6 +162,11 @@ jobs:
141162
with:
142163
name: deb
143164
path: artifacts/deb
165+
- name: Download AppImage Artifact
166+
uses: actions/download-artifact@v4
167+
with:
168+
name: appimage
169+
path: artifacts/appimage
144170
- name: Extract version and rename assets
145171
run: |
146172
VERSION=${GITHUB_REF_NAME#v}
@@ -150,7 +176,7 @@ jobs:
150176
mv artifacts/apk/android-release-unsigned-signed.apk artifacts/LinuxCommandLibrary-${VERSION}-android.apk
151177
152178
# Rename JAR
153-
mv artifacts/jar/linuxcommandlibrary.jar artifacts/linuxcommandlibrary-${VERSION}.jar
179+
mv artifacts/jar/linuxcommandlibrary.jar artifacts/linuxcommandlibrary-${VERSION}-cli.jar
154180
155181
# Rename DMG (find the actual file)
156182
DMG_FILE=$(find artifacts/dmg -name "*.dmg" | head -1)
@@ -163,6 +189,10 @@ jobs:
163189
# Rename DEB (find the actual file)
164190
DEB_FILE=$(find artifacts/deb -name "*.deb" | head -1)
165191
mv "$DEB_FILE" artifacts/LinuxCommandLibrary-${VERSION}-linux.deb
192+
193+
# Rename AppImage (find the actual file)
194+
APPIMAGE_FILE=$(find artifacts/appimage -name "*.AppImage" | head -1)
195+
mv "$APPIMAGE_FILE" artifacts/LinuxCommandLibrary-${VERSION}-linux.AppImage
166196
- name: Create Github Release
167197
id: create_release
168198
uses: actions/create-release@v1
@@ -186,8 +216,8 @@ jobs:
186216
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
187217
with:
188218
upload_url: ${{ steps.create_release.outputs.upload_url }}
189-
asset_path: artifacts/linuxcommandlibrary-${{ env.VERSION }}.jar
190-
asset_name: linuxcommandlibrary-${{ env.VERSION }}.jar
219+
asset_path: artifacts/linuxcommandlibrary-${{ env.VERSION }}-cli.jar
220+
asset_name: linuxcommandlibrary-${{ env.VERSION }}-cli.jar
191221
asset_content_type: application/java-archive
192222
- name: Upload DMG to Github Release
193223
uses: actions/upload-release-asset@v1.0.1
@@ -216,3 +246,12 @@ jobs:
216246
asset_path: artifacts/LinuxCommandLibrary-${{ env.VERSION }}-linux.deb
217247
asset_name: LinuxCommandLibrary-${{ env.VERSION }}-linux.deb
218248
asset_content_type: application/vnd.debian.binary-package
249+
- name: Upload AppImage to Github Release
250+
uses: actions/upload-release-asset@v1.0.1
251+
env:
252+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
253+
with:
254+
upload_url: ${{ steps.create_release.outputs.upload_url }}
255+
asset_path: artifacts/LinuxCommandLibrary-${{ env.VERSION }}-linux.AppImage
256+
asset_name: LinuxCommandLibrary-${{ env.VERSION }}-linux.AppImage
257+
asset_content_type: application/x-executable

0 commit comments

Comments
 (0)