Skip to content

Commit

Permalink
local test with act passed
Browse files Browse the repository at this point in the history
  • Loading branch information
zqigolden committed Dec 17, 2024
1 parent 0d6f3ba commit ee76922
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/appimage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
flutter-build-linux:
name: "Release for Linux"
# Change to self-hosted runner
runs-on: self-hosted
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Clone repository
Expand Down Expand Up @@ -62,34 +62,39 @@ jobs:
shell: bash

# Steps to create an AppImage
- name: Download linuxdeploy
shell: bash
- name: Download and extract linuxdeploy
run: |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
# Extract the AppImage
./linuxdeploy-x86_64.AppImage --appimage-extract
# Rename for clarity
rm -rf linuxdeploy || true
mv squashfs-root linuxdeploy
# Prepare AppDir structure for AppImage
# Modify paths and filenames as needed for your application.
# Ensure you have a .desktop file and icon file checked into your repo.
# For example, assume you have `assets/icon.png` and `oneAnime.desktop` in the repo.

- name: Prepare AppDir
shell: bash
run: |
mkdir -p AppDir/usr/bin
cp -r build/linux/x64/release/bundle/* AppDir/usr/bin/
# Copy desktop file and icon
cp oneAnime.desktop AppDir/
cp assets/images/logo/logo_rounded.png AppDir/
cp oneAnime.desktop AppDir/oneAnime.desktop
cp assets/images/logo/logo_rounded_160x160.png AppDir/icon.png
# The desktop file should have a line like "Icon=icon" and be named accordingly.
# Build the AppImage with linuxdeploy
- name: Build AppImage
shell: bash
run: |
# Using linuxdeploy to bundle dependencies and produce an AppImage
# Adjust arguments if needed (e.g., specifying desktop file with --desktop-file)
./linuxdeploy-x86_64.AppImage --appdir AppDir --desktop-file AppDir/oneAnime.desktop --icon-file AppDir/icon.png --output appimage
mv *.AppImage oneAnime_linux_${{ env.tag }}.AppImage
linuxdeploy/AppRun --appdir AppDir \
--desktop-file AppDir/oneAnime.desktop \
--icon-file AppDir/icon.png \
--output appimage
mv OneAnime-x86_64.AppImage oneAnime_linux_${{ env.tag }}.AppImage
- name: Upload Linux AppImage
uses: actions/upload-artifact@v4
Expand Down
Binary file added assets/images/logo/logo_rounded_160x160.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion oneAnime.desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=OneAnime
Comment=Watch and manage anime collections
Exec=./oneanime
Exec=oneanime
Icon=icon
Terminal=false
Type=Application
Expand Down

0 comments on commit ee76922

Please sign in to comment.