Add AppImage bundle (#1519)
* Add AppImage build * add appimage package variable name * Add workflows --------- Co-authored-by: Syer10 <syer10@users.noreply.github.com>
This commit is contained in:
@@ -112,16 +112,25 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- debian-all
|
||||
- linux-assets
|
||||
- linux-x64
|
||||
- macOS-x64
|
||||
- macOS-arm64
|
||||
- windows-x64
|
||||
include:
|
||||
- name: debian-all
|
||||
jre: linux-x64
|
||||
- name: appimage
|
||||
jre: linux-x64
|
||||
- name: linux-assets
|
||||
jre: linux-assets
|
||||
- name: linux-x64
|
||||
jre: linux-x64
|
||||
- name: macOS-x64
|
||||
jre: macOS-x64
|
||||
- name: macOS-arm64
|
||||
jre: macOS-arm64
|
||||
- name: windows-x64
|
||||
jre: windows-x64
|
||||
name: [debian-all, appimage, linux-assets, linux-x64, macOS-x64, macOS-arm64, windows-x64]
|
||||
|
||||
name: Make ${{ matrix.os }} release
|
||||
needs: [build,jlink]
|
||||
name: Make ${{ matrix.name }} release
|
||||
needs: [build, jlink]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download Jar
|
||||
@@ -132,9 +141,9 @@ jobs:
|
||||
|
||||
- name: Download JRE
|
||||
uses: actions/download-artifact@v4
|
||||
if: matrix.os != 'linux-assets' && matrix.os != 'debian-all'
|
||||
if: matrix.name != 'linux-assets' && matrix.name != 'debian-all'
|
||||
with:
|
||||
name: ${{ matrix.os }}-jre
|
||||
name: ${{ matrix.jre }}-jre
|
||||
path: jre
|
||||
|
||||
- name: Download icons
|
||||
@@ -148,16 +157,16 @@ jobs:
|
||||
with:
|
||||
name: scripts
|
||||
|
||||
- name: Make ${{ matrix.os }} release
|
||||
- name: Make ${{ matrix.name }} release
|
||||
run: |
|
||||
mkdir upload
|
||||
tar -xvpf scripts.tar.gz
|
||||
scripts/bundler.sh -o upload/ ${{ matrix.os }}
|
||||
scripts/bundler.sh -o upload/ ${{ matrix.name }}
|
||||
|
||||
- name: Upload ${{ matrix.os }} release
|
||||
- name: Upload ${{ matrix.name }} release
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }}
|
||||
name: ${{ matrix.name }}
|
||||
path: upload/*
|
||||
if-no-files-found: error
|
||||
|
||||
@@ -173,6 +182,10 @@ jobs:
|
||||
with:
|
||||
name: debian-all
|
||||
path: release
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: appimage
|
||||
path: release
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: linux-assets
|
||||
|
||||
@@ -114,15 +114,24 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- debian-all
|
||||
- linux-assets
|
||||
- linux-x64
|
||||
- macOS-x64
|
||||
- macOS-arm64
|
||||
- windows-x64
|
||||
include:
|
||||
- name: debian-all
|
||||
jre: linux-x64
|
||||
- name: appimage
|
||||
jre: linux-x64
|
||||
- name: linux-assets
|
||||
jre: linux-assets
|
||||
- name: linux-x64
|
||||
jre: linux-x64
|
||||
- name: macOS-x64
|
||||
jre: macOS-x64
|
||||
- name: macOS-arm64
|
||||
jre: macOS-arm64
|
||||
- name: windows-x64
|
||||
jre: windows-x64
|
||||
name: [debian-all, appimage, linux-assets, linux-x64, macOS-x64, macOS-arm64, windows-x64]
|
||||
|
||||
name: Make ${{ matrix.os }} release
|
||||
name: Make ${{ matrix.name }} release
|
||||
needs: [build, jlink]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -134,9 +143,9 @@ jobs:
|
||||
|
||||
- name: Download JRE
|
||||
uses: actions/download-artifact@v4
|
||||
if: matrix.os != 'linux-assets' && matrix.os != 'debian-all'
|
||||
if: matrix.name != 'linux-assets' && matrix.name != 'debian-all'
|
||||
with:
|
||||
name: ${{ matrix.os }}-jre
|
||||
name: ${{ matrix.jre }}-jre
|
||||
path: jre
|
||||
|
||||
- name: Download icons
|
||||
@@ -150,16 +159,16 @@ jobs:
|
||||
with:
|
||||
name: scripts
|
||||
|
||||
- name: Make ${{ matrix.os }} release
|
||||
- name: Make ${{ matrix.name }} release
|
||||
run: |
|
||||
mkdir upload/
|
||||
tar -xvpf scripts.tar.gz
|
||||
scripts/bundler.sh -o upload/ ${{ matrix.os }}
|
||||
scripts/bundler.sh -o upload/ ${{ matrix.name }}
|
||||
|
||||
- name: Upload ${{ matrix.os }} files
|
||||
- name: Upload ${{ matrix.name }} files
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }}
|
||||
name: ${{ matrix.name }}
|
||||
path: upload/*
|
||||
if-no-files-found: error
|
||||
|
||||
@@ -176,6 +185,10 @@ jobs:
|
||||
with:
|
||||
name: debian-all
|
||||
path: release
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: appimage
|
||||
path: release
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: linux-assets
|
||||
|
||||
@@ -48,6 +48,19 @@ main() {
|
||||
make_deb_package
|
||||
move_release_to_output_dir
|
||||
;;
|
||||
appimage)
|
||||
# https://github.com/adoptium/temurin21-binaries/releases/
|
||||
JRE_RELEASE="jdk-21.0.7+6"
|
||||
JRE="OpenJDK21U-jre_x64_linux_hotspot_$(echo "$JRE_RELEASE" | sed 's/jdk//;s/-//g;s/+/_/g').tar.gz"
|
||||
JRE_DIR="$JRE_RELEASE-jre"
|
||||
JRE_URL="https://github.com/adoptium/temurin21-binaries/releases/download/$JRE_RELEASE/$JRE"
|
||||
setup_jre
|
||||
|
||||
RELEASE="$RELEASE_NAME.AppImage"
|
||||
APPIMAGE_URL="https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
|
||||
make_appimage
|
||||
move_release_to_output_dir
|
||||
;;
|
||||
linux-assets)
|
||||
RELEASE="$RELEASE_NAME.tar.gz"
|
||||
copy_linux_package_assets_to "$RELEASE_NAME/"
|
||||
@@ -230,6 +243,22 @@ make_deb_package() {
|
||||
mv "$RELEASE_NAME/$deb" "$RELEASE"
|
||||
}
|
||||
|
||||
# https://linuxconfig.org/building-a-hello-world-appimage-on-linux
|
||||
make_appimage() {
|
||||
local APPIMAGE_TOOLNAME="appimagetool-x86_64.AppImage"
|
||||
mkdir "$RELEASE_NAME/bin/"
|
||||
cp "$JAR" "$RELEASE_NAME/bin/Suwayomi-Server.jar"
|
||||
|
||||
cp "scripts/resources/pkg/suwayomi-server.desktop" "$RELEASE_NAME/suwayomi-server.desktop"
|
||||
cp "server/src/main/resources/icon/faviconlogo.png" "$RELEASE_NAME/suwayomi-server.png"
|
||||
cp "scripts/resources/appimage/AppRun" "$RELEASE_NAME/AppRun"
|
||||
chmod +x "$RELEASE_NAME/AppRun"
|
||||
|
||||
curl -L $APPIMAGE_URL -o $APPIMAGE_TOOLNAME
|
||||
chmod +x $APPIMAGE_TOOLNAME
|
||||
ARCH=x86_64 ./$APPIMAGE_TOOLNAME "$RELEASE_NAME" "$RELEASE"
|
||||
}
|
||||
|
||||
make_windows_bundle() {
|
||||
## I disabled this section until someone find a solution to this error:
|
||||
##E: Unable to correct problems, you have held broken packages.
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec $APPDIR/jre/bin/java -jar $APPDIR/bin/Suwayomi-Server.jar
|
||||
Reference in New Issue
Block a user