updated workflow and CMakeLists.txt

This commit is contained in:
Lasan Mahaliyana
2026-03-01 10:06:51 +05:30
parent 62c6db53e7
commit 1d59c8c7c3
2 changed files with 62 additions and 14 deletions
+53 -14
View File
@@ -89,31 +89,68 @@ jobs:
- name: Configure QML tray app
run: |
STAGING="$RUNNER_TEMP/staging"
cmake -S sharing/linux/qml_tray_app \
-B sharing/linux/qml_tray_app/build \
-DCMAKE_BUILD_TYPE=Release \
-DNEARBY_INSTALL_PREFIX="${{ steps.nearby.outputs.nearby_prefix }}"
-DCMAKE_INSTALL_PREFIX="$STAGING" \
-DNEARBY_PREFIX="${{ steps.nearby.outputs.nearby_prefix }}"
- name: Build QML tray app
run: cmake --build sharing/linux/qml_tray_app/build -j
- name: Package release bundle
run: |
cd sharing/linux/qml_tray_app/build
cpack -G ZIP
- name: Install to staging directory
run: cmake --install sharing/linux/qml_tray_app/build
- name: Generate SHA256 checksum
- name: Package tarball
run: |
cd sharing/linux/qml_tray_app/build
sha256sum nearby_qml_tray_app-Linux-x86_64.zip > nearby_qml_tray_app-Linux-x86_64.zip.sha256
STAGING="$RUNNER_TEMP/staging"
TARBALL="nearby-file-share-linux-x86_64.tar.gz"
tar -czf "$RUNNER_TEMP/$TARBALL" -C "$STAGING" .
echo "tarball=$RUNNER_TEMP/$TARBALL" >> "$GITHUB_ENV"
echo "tarball_name=$TARBALL" >> "$GITHUB_ENV"
- name: Upload build artifact
- name: Download linuxdeploy
run: |
cd "$RUNNER_TEMP"
curl -fSL -o linuxdeploy-x86_64.AppImage \
https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
curl -fSL -o linuxdeploy-plugin-qt-x86_64.AppImage \
https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-qt-x86_64.AppImage
- name: Build AppImage
run: |
STAGING="$RUNNER_TEMP/staging"
NEARBY_PREFIX="${{ steps.nearby.outputs.nearby_prefix }}"
export QMAKE="$(which qmake6)"
export OUTPUT="$RUNNER_TEMP/Nearby_File_Share-x86_64.AppImage"
"$RUNNER_TEMP/linuxdeploy-x86_64.AppImage" \
--appdir "$RUNNER_TEMP/AppDir" \
--executable "$STAGING/bin/nearby_qml_file_tray_app" \
--desktop-file sharing/linux/qml_tray_app/nearby-file-share.desktop \
--icon-file sharing/linux/qml_tray_app/tray_icon.png \
--library "$NEARBY_PREFIX/lib/libnearby_connections_service_linux_shared.so" \
--plugin qt \
--output appimage
echo "appimage=$OUTPUT" >> "$GITHUB_ENV"
echo "appimage_name=Nearby_File_Share-x86_64.AppImage" >> "$GITHUB_ENV"
- name: Generate SHA256 checksums
run: |
cd "$RUNNER_TEMP"
sha256sum "${{ env.tarball_name }}" > "${{ env.tarball_name }}.sha256"
sha256sum "${{ env.appimage_name }}" > "${{ env.appimage_name }}.sha256"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: nearby_qml_tray_app-Linux-x86_64
name: nearby-file-share-linux-x86_64
path: |
sharing/linux/qml_tray_app/build/nearby_qml_tray_app-Linux-x86_64.zip
sharing/linux/qml_tray_app/build/nearby_qml_tray_app-Linux-x86_64.zip.sha256
${{ env.tarball }}
${{ env.tarball }}.sha256
${{ env.appimage }}
${{ env.appimage }}.sha256
- name: Publish GitHub Release
if: startsWith(github.ref, 'refs/tags/')
@@ -121,5 +158,7 @@ jobs:
with:
generate_release_notes: true
files: |
sharing/linux/qml_tray_app/build/nearby_qml_tray_app-Linux-x86_64.zip
sharing/linux/qml_tray_app/build/nearby_qml_tray_app-Linux-x86_64.zip.sha256
${{ env.tarball }}
${{ env.tarball }}.sha256
${{ env.appimage }}
${{ env.appimage }}.sha256