@@ -103,39 +103,24 @@ jobs:
103103 repo_token : ${{ secrets.GITHUB_TOKEN }}
104104 file : ${{ steps.compress.outputs.archiveName }}
105105
106- build-appimage :
107- name : Build AppImage
108- needs : build-linux
109- runs-on : ubuntu-latest
110- permissions :
111- contents : write
112- timeout-minutes : 10
113- steps :
114- - name : Checkout code
115- uses : actions/checkout@v6
106+ # Now build AppImage
116107
117- - uses : " ./.github/shared_workflows/install_apt_dependencies"
118108 - name : Install FUSE
119109 run : |
120110 sudo add-apt-repository universe
121- sudo apt install libfuse2
122-
123- - name : Download app archive
124- uses : actions/download-artifact@v7
125- with :
126- name : Saber-Archive-x86_64
127- - name : Extract app archive
128- run : |
129- mkdir -p linux/AppImage/AppDir/usr/bin
130- tar -xzvf Saber*.tar.gz -C linux/AppImage/AppDir/usr/bin
131- - name : Prepare AppDir
132- working-directory : linux/AppImage/AppDir
111+ sudo apt-get install libfuse2t64
112+
113+ - name : Prepare AppDir for AppImage
133114 run : |
134- mkdir -p usr/share
135- cp -R usr/bin/share/* usr/share/
136- rm -rf usr/bin/share
137- echo "LD_LIBRARY_PATH=$(pwd)/usr/bin/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
138- echo 'UPDATE_INFORMATION=gh-releases-zsync|saber-notes|saber|latest|Saber-*-x86_64.AppImage.zsync' >> $GITHUB_ENV
115+ rm -rf linux/AppImage/AppDir/
116+
117+ mkdir -p linux/AppImage/AppDir/usr/bin/
118+ cp -R AppDir/* linux/AppImage/AppDir/usr/bin/
119+
120+ mv linux/AppImage/AppDir/usr/bin/share linux/AppImage/AppDir/usr/
121+
122+ echo "LD_LIBRARY_PATH=$(pwd)/linux/AppImage/AppDir/usr/bin/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
123+ echo 'UPDATE_INFORMATION=gh-releases-zsync|saber-notes|saber|latest|Saber-*-${{ matrix.arch.archive-suffix }}.AppImage.zsync' >> $GITHUB_ENV
139124
140125 - name : Install linuxdeploy
141126 working-directory : linux/AppImage
@@ -144,21 +129,26 @@ jobs:
144129 chmod +x linuxdeploy-x86_64.AppImage
145130 - name : Build AppImage
146131 working-directory : linux/AppImage
132+ run : ./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage
133+
134+ - run : tree linux/AppImage -L3
135+
136+ - name : Rename AppImage
147137 run : |
148- ./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage
149-
150- - run : tree linux/AppImage
138+ buildName=$(grep -oP "(?<=buildName = ').*(?=')" lib/data/version.dart)
139+ mv linux/AppImage/Saber-*.AppImage linux/AppImage/Saber-${buildName}-${{ matrix.arch.archive-suffix }}.AppImage
140+ mv linux/AppImage/Saber-*.AppImage.zsync linux/AppImage/Saber-${buildName}-${{ matrix.arch.archive-suffix }}.AppImage.zsync
151141
152142 - name : Upload artifact
153143 uses : actions/upload-artifact@v6
154144 with :
155145 name : AppImage artifact
156- path : appimage/ Saber-*-x86_64 .AppImage*
146+ path : linux/AppImage/ Saber-*.AppImage*
157147
158148 - name : Upload to GitHub release
159149 uses : svenstaro/upload-release-action@v2
160150 if : ${{ startsWith(github.ref, 'refs/tags/') }}
161151 with :
162152 repo_token : ${{ secrets.GITHUB_TOKEN }}
163- file : appimage/ Saber-*-x86_64 .AppImage*
153+ file : linux/AppImage/ Saber-*.AppImage*
164154 file_glob : true
0 commit comments