mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-06-30 17:34:39 -05:00
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:
43
.github/workflows/build_push.yml
vendored
43
.github/workflows/build_push.yml
vendored
@@ -112,16 +112,25 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
include:
|
||||||
- debian-all
|
- name: debian-all
|
||||||
- linux-assets
|
jre: linux-x64
|
||||||
- linux-x64
|
- name: appimage
|
||||||
- macOS-x64
|
jre: linux-x64
|
||||||
- macOS-arm64
|
- name: linux-assets
|
||||||
- windows-x64
|
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]
|
needs: [build, jlink]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download Jar
|
- name: Download Jar
|
||||||
@@ -132,9 +141,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Download JRE
|
- name: Download JRE
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
if: matrix.os != 'linux-assets' && matrix.os != 'debian-all'
|
if: matrix.name != 'linux-assets' && matrix.name != 'debian-all'
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}-jre
|
name: ${{ matrix.jre }}-jre
|
||||||
path: jre
|
path: jre
|
||||||
|
|
||||||
- name: Download icons
|
- name: Download icons
|
||||||
@@ -148,16 +157,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: scripts
|
name: scripts
|
||||||
|
|
||||||
- name: Make ${{ matrix.os }} release
|
- name: Make ${{ matrix.name }} release
|
||||||
run: |
|
run: |
|
||||||
mkdir upload
|
mkdir upload
|
||||||
tar -xvpf scripts.tar.gz
|
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
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}
|
name: ${{ matrix.name }}
|
||||||
path: upload/*
|
path: upload/*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
@@ -173,6 +182,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: debian-all
|
name: debian-all
|
||||||
path: release
|
path: release
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: appimage
|
||||||
|
path: release
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: linux-assets
|
name: linux-assets
|
||||||
|
|||||||
41
.github/workflows/publish.yml
vendored
41
.github/workflows/publish.yml
vendored
@@ -114,15 +114,24 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
include:
|
||||||
- debian-all
|
- name: debian-all
|
||||||
- linux-assets
|
jre: linux-x64
|
||||||
- linux-x64
|
- name: appimage
|
||||||
- macOS-x64
|
jre: linux-x64
|
||||||
- macOS-arm64
|
- name: linux-assets
|
||||||
- windows-x64
|
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]
|
needs: [build, jlink]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -134,9 +143,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Download JRE
|
- name: Download JRE
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
if: matrix.os != 'linux-assets' && matrix.os != 'debian-all'
|
if: matrix.name != 'linux-assets' && matrix.name != 'debian-all'
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}-jre
|
name: ${{ matrix.jre }}-jre
|
||||||
path: jre
|
path: jre
|
||||||
|
|
||||||
- name: Download icons
|
- name: Download icons
|
||||||
@@ -150,16 +159,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: scripts
|
name: scripts
|
||||||
|
|
||||||
- name: Make ${{ matrix.os }} release
|
- name: Make ${{ matrix.name }} release
|
||||||
run: |
|
run: |
|
||||||
mkdir upload/
|
mkdir upload/
|
||||||
tar -xvpf scripts.tar.gz
|
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
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}
|
name: ${{ matrix.name }}
|
||||||
path: upload/*
|
path: upload/*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
@@ -176,6 +185,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: debian-all
|
name: debian-all
|
||||||
path: release
|
path: release
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: appimage
|
||||||
|
path: release
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: linux-assets
|
name: linux-assets
|
||||||
|
|||||||
@@ -48,6 +48,19 @@ main() {
|
|||||||
make_deb_package
|
make_deb_package
|
||||||
move_release_to_output_dir
|
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)
|
linux-assets)
|
||||||
RELEASE="$RELEASE_NAME.tar.gz"
|
RELEASE="$RELEASE_NAME.tar.gz"
|
||||||
copy_linux_package_assets_to "$RELEASE_NAME/"
|
copy_linux_package_assets_to "$RELEASE_NAME/"
|
||||||
@@ -230,6 +243,22 @@ make_deb_package() {
|
|||||||
mv "$RELEASE_NAME/$deb" "$RELEASE"
|
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() {
|
make_windows_bundle() {
|
||||||
## I disabled this section until someone find a solution to this error:
|
## I disabled this section until someone find a solution to this error:
|
||||||
##E: Unable to correct problems, you have held broken packages.
|
##E: Unable to correct problems, you have held broken packages.
|
||||||
|
|||||||
3
scripts/resources/appimage/AppRun
Normal file
3
scripts/resources/appimage/AppRun
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
exec $APPDIR/jre/bin/java -jar $APPDIR/bin/Suwayomi-Server.jar
|
||||||
Reference in New Issue
Block a user