Skip to content

Commit

Permalink
build: provide update information for AppImages
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Nov 14, 2022
1 parent ac41f0d commit 5bc13b0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt update
sudo apt install libpulse-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libgstreamer-plugins-base1.0-0
sudo apt install libpulse-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libgstreamer-plugins-base1.0-0 zsync
- name: Install Qt
uses: jurplel/install-qt-action@v3
Expand Down Expand Up @@ -233,6 +233,7 @@ jobs:
run: |
./scripts/package-appimage.sh
mv Grabber_*-x86_64.AppImage Grabber-x86_64.AppImage
mv Grabber_*-x86_64.AppImage.zsync Grabber-x86_64.AppImage.zsync
- name: Upload AppImage
uses: actions/upload-artifact@v3
Expand All @@ -241,6 +242,13 @@ jobs:
path: Grabber-x86_64.AppImage
if-no-files-found: error

- name: Upload AppImage update information
uses: actions/upload-artifact@v3
with:
name: Grabber-x86_64.AppImage.zsync
path: Grabber-x86_64.AppImage.zsync
if-no-files-found: error

- name: Generate archive
run: ./scripts/package-linux.sh

Expand Down Expand Up @@ -603,6 +611,11 @@ jobs:
with:
name: Grabber-x86_64.AppImage

- name: Download artifact (Linux AppImage update information)
uses: actions/download-artifact@v3
with:
name: Grabber-x86_64.AppImage.zsync

- name: Download artifact (Linux archive)
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -653,6 +666,7 @@ jobs:
- name: Rename artifacts
run: |
mv Grabber-x86_64.AppImage Grabber_${VERSION}-x86_64.AppImage
mv Grabber-x86_64.AppImage.zsync Grabber_${VERSION}-x86_64.AppImage.zsync
mv Grabber.tar.gz Grabber_${VERSION}.tar.gz
mv Grabber.dmg Grabber_${VERSION}.dmg
mv Grabber_x86.exe Grabber_${VERSION}_x86.exe
Expand Down
3 changes: 2 additions & 1 deletion scripts/package-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ popd

# See https://github.com/probonopd/linuxdeployqt
export VERSION=$GRABBER_VERSION
./vendor/linuxdeployqt.AppImage "$APP_DIR/usr/share/applications/grabber.desktop" -appimage
./vendor/linuxdeployqt.AppImage "$APP_DIR/usr/share/applications/grabber.desktop" -appimage -updateinformation="gh-releases-zsync|Bionus|imgbrd-grabber|latest|Grabber_*-x86_64.AppImage.zsync"
mv "Grabber-$VERSION-x86_64.AppImage" "Grabber_$VERSION-x86_64.AppImage"
mv "Grabber-$VERSION-x86_64.AppImage.zsync" "Grabber_$VERSION-x86_64.AppImage.zsync"

# Cleanup
rm -rf $APP_DIR

0 comments on commit 5bc13b0

Please sign in to comment.