Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 53 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build AppImage in Docker
- name: Build AppImage in Docker 😫
run: bash -ex ci/build-in-docker.sh

- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -36,17 +37,49 @@ jobs:
appimageupdatetool*.AppImage*
validate*.AppImage*

- name: Set version file
if: ${{ matrix.optimized == false }}
run: |
echo "$GITHUB_SHA"
echo "$GITHUB_SHA" | cut -c 1-9 > ~/version
echo "APP_VERSION=$(cat ~/version)" >> "${GITHUB_ENV}"

- name: Upload version file
uses: actions/upload-artifact@v4.6.1
with:
name: version
path: ~/version
overwrite: true

appimage-upload:
name: "Create release and upload artifacts"
needs: ["appimage-build"]
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Download artifacts
uses: actions/download-artifact@v4

- name: Inspect directory after downloading artifacts
run: ls -alFR

- name: Read version
run: |
cat ./version/version
export VERSION="$(cat ./version/version)"
echo "APP_VERSION=${VERSION}" >> "${GITHUB_ENV}"

#Version Release
- name: Del Previous Release
run: |
gh release delete "${APP_VERSION}" --repo "${GITHUB_REPOSITORY}" --cleanup-tag -y
sleep 5
env:
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
continue-on-error: true

- name: Create release and upload artifacts
uses: softprops/action-gh-release@v2
with:
Expand All @@ -58,3 +91,22 @@ jobs:
make_latest: true
files: |
**/*.AppImage*

#Snapshot Release
- name: Get Date
run: |
SNAPSHOT_TAG="$(date --utc +'%Y%m%d-%H%M%S')"
echo SNAPSHOT_TAG="${SNAPSHOT_TAG}" >> "${GITHUB_ENV}"
continue-on-error: false
- name: Snapshot Releaser
uses: softprops/action-gh-release@v2
with:
name: "Snapshot ${{ env.APP_VERSION}}"
tag_name: "${{ env.SNAPSHOT_TAG}}"
prerelease: false
draft: false
generate_release_notes: false
make_latest: false
files: |
**/*.AppImage*
continue-on-error: false
51 changes: 20 additions & 31 deletions ci/build-appimages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cd "$BUILD_DIR"
export ARCH=${ARCH:-"$(uname -m)"}

cmake "$REPO_ROOT" \
-DBUILD_QT_UI=ON \
-DBUILD_QT_UI=OFF \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=MinSizeRel

Expand All @@ -35,55 +35,44 @@ make -j"$(nproc)"

# set up the AppDirs initially
for appdir in appimageupdatetool.AppDir validate.AppDir; do
make install DESTDIR="$appdir"
mkdir -p "$appdir"/resources
cp -v "$REPO_ROOT"/resources/*.xpm "$appdir"/resources/
make install DESTDIR="$appdir"
mkdir -p "$appdir"/resources
cp -v "$REPO_ROOT"/resources/*.xpm "$appdir"/resources/
done

# determine Git commit ID
# appimagetool uses this for naming the file
VERSION="$(cd "$REPO_ROOT" && git rev-parse --short HEAD)"
export VERSION
#echo "$VERSION" > ~/version

# prepend GitHub run number if possible
if [ "$GITHUB_RUN_NUMBER" != "" ]; then
export VERSION="$GITHUB_RUN_NUMBER-$VERSION"
export VERSION="$GITHUB_RUN_NUMBER-$VERSION"
fi


# remove unnecessary binaries from AppDirs
rm appimageupdatetool.AppDir/usr/bin/AppImageUpdate
rm appimageupdatetool.AppDir/usr/bin/validate
rm appimageupdatetool.AppDir/usr/lib/*/libappimageupdate-qt*.so*
rm validate.AppDir/usr/bin/{AppImageUpdate,appimageupdatetool}
rm validate.AppDir/usr/lib/*/libappimageupdate*.so*


# remove other unnecessary data
find {appimageupdatetool,validate}.AppDir -type f -iname '*.a' -delete
rm -rf appimageupdatetool.AppDir/usr/include
# remove unnecessary files from AppDirs
rm appimageupdatetool.AppDir/usr/bin/AppImageUpdate || true
rm appimageupdatetool.AppDir/usr/lib/*/libappimageupdate-qt*.so* || true
rm -rf appimageupdatetool.AppDir/usr/include || true
find appimageupdatetool.AppDir -type f -iname '*.a' -delete


# get linuxdeploy and its qt plugin
wget https://github.com/TheAssassin/linuxdeploy/releases/download/continuous/linuxdeploy-"$CMAKE_ARCH".AppImage
wget https://github.com/TheAssassin/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-"$CMAKE_ARCH".AppImage
wget https://github.com/darealshinji/linuxdeploy-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt.sh
chmod +x linuxdeploy*.AppImage linuxdeploy-plugin-checkrt.sh

for app in appimageupdatetool validate; do
find "$app".AppDir/
export UPD_INFO="gh-releases-zsync|pkgforge-dev|AppImageUpdate|continuous|$app-*$ARCH.AppImage.zsync"

# overwrite AppImage filename to get static filenames
# see https://github.com/AppImage/AppImageUpdate/issues/89
export OUTPUT="$app"-"$ARCH".AppImage

# bundle application
./linuxdeploy-"$CMAKE_ARCH".AppImage --appdir "$app".AppDir --output appimage -d "$REPO_ROOT"/resources/"$app".desktop -i "$REPO_ROOT"/resources/appimage.png --plugin checkrt
done

# move AppImages to old cwd
mv appimageupdatetool*.AppImage* "$OLD_CWD"/
mv validate*.AppImage* "$OLD_CWD"/
find appimageupdatetool.AppDir/
export UPD_INFO="gh-releases-zsync|pkgforge-dev|AppImageUpdate|continuous|*$ARCH.AppImage.zsync"
export OUTPUT="appimageupdatetool"-"$ARCH".AppImage

# bundle application
./linuxdeploy-"$CMAKE_ARCH".AppImage --appdir "appimageupdatetool".AppDir --output appimage \
-d "$REPO_ROOT"/resources/"appimageupdatetool".desktop -i "$REPO_ROOT"/resources/appimage.png --plugin checkrt

# move AppImage to old cwd
mv appimageupdatetool*.AppImage* "$OLD_CWD"/
cd -
7 changes: 0 additions & 7 deletions ci/build-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ case "$ARCH" in
x86_64)
docker_platform=linux/amd64
;;
i686)
CMAKE_ARCH=i386
docker_platform=linux/386
;;
armhf)
docker_platform=linux/arm/v7
;;
aarch64)
docker_platform=linux/arm64/v8
;;
Expand Down
Loading