From d474becefeb72b9200cc57fd471ca8863a479d1d Mon Sep 17 00:00:00 2001 From: Lasan Mahaliyana Date: Mon, 20 Jul 2026 09:25:58 +0530 Subject: [PATCH] added packaging workflow to github action and updated icon --- .../workflows/release-minimal-appimage.yaml | 104 +++++++++++++ .../workflows/release-nearby-qml-tray.yaml | 142 ------------------ sharing/linux/app/BUILD | 8 +- sharing/linux/app/icons/quickshare.svg | 10 ++ sharing/linux/app/packaging/AppRun | 2 +- .../app/packaging/package_minimal_appimage.sh | 26 ++-- ...rby-sharing.desktop => quickshare.desktop} | 6 +- ...g.metainfo.xml => quickshare.metainfo.xml} | 8 +- 8 files changed, 139 insertions(+), 167 deletions(-) create mode 100644 .github/workflows/release-minimal-appimage.yaml delete mode 100644 .github/workflows/release-nearby-qml-tray.yaml create mode 100644 sharing/linux/app/icons/quickshare.svg rename sharing/linux/app/packaging/{nearby-sharing.desktop => quickshare.desktop} (70%) rename sharing/linux/app/packaging/{nearby-sharing.metainfo.xml => quickshare.metainfo.xml} (64%) diff --git a/.github/workflows/release-minimal-appimage.yaml b/.github/workflows/release-minimal-appimage.yaml new file mode 100644 index 00000000..43c5d4d1 --- /dev/null +++ b/.github/workflows/release-minimal-appimage.yaml @@ -0,0 +1,104 @@ +name: Release QuickShare AppImage + +on: + push: + tags: + - 'v*' + workflow_dispatch: + inputs: + tag: + description: Existing v* tag to build and publish + required: true + type: string + +env: + FORCE_COLOR: true + RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }} + +permissions: + contents: write + +jobs: + build-and-release-appimage: + name: Build and Release QuickShare AppImage + runs-on: ubuntu-latest + + steps: + - name: Validate release tag + shell: bash + run: | + if [[ ! "$RELEASE_TAG" =~ ^v.+ ]]; then + echo "Release tag must start with v: $RELEASE_TAG" >&2 + exit 1 + fi + + - name: Checkout release tag + uses: actions/checkout@v6 + with: + ref: ${{ env.RELEASE_TAG }} + submodules: recursive + + - name: Set up Bazelisk + uses: bazel-contrib/setup-bazel@0.18.0 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }} + repository-cache: true + + - name: Install Linux build dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + build-essential \ + clang \ + cmake \ + ninja-build \ + pkg-config \ + libssl-dev \ + libsystemd-dev \ + libcurlpp-dev \ + libasound2-dev \ + libunistring-dev \ + libldap-dev \ + libkrb5-dev \ + libgpg-error-dev \ + libbluetooth-dev \ + libxkbcommon-dev \ + patchelf \ + qt6-base-dev \ + qt6-declarative-dev \ + qt6-wayland \ + qt6-tools-dev \ + qt6-tools-dev-tools \ + libqrencode-dev + + - name: Build minimal AppImage inputs + run: | + bazel build \ + --@com_google_protobuf//bazel/toolchains:prefer_prebuilt_protoc=true \ + --copt='-DGITHUB_BUILD' \ + //sharing/linux/app:appimage + + - name: Package and validate minimal AppImage + run: ./sharing/linux/app/packaging/package_minimal_appimage.sh + + - name: Generate SHA256 checksum + working-directory: sharing/linux/dist-minimal + run: | + sha256sum QuickShare-x86_64.AppImage \ + > QuickShare-x86_64.AppImage.sha256 + sha256sum --check QuickShare-x86_64.AppImage.sha256 + + - name: Validate AppImage output + run: | + test -x sharing/linux/dist-minimal/QuickShare-x86_64.AppImage + file sharing/linux/dist-minimal/QuickShare-x86_64.AppImage + + - name: Publish GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ env.RELEASE_TAG }} + generate_release_notes: true + files: | + sharing/linux/dist-minimal/QuickShare-x86_64.AppImage + sharing/linux/dist-minimal/QuickShare-x86_64.AppImage.sha256 diff --git a/.github/workflows/release-nearby-qml-tray.yaml b/.github/workflows/release-nearby-qml-tray.yaml deleted file mode 100644 index 4825a18a..00000000 --- a/.github/workflows/release-nearby-qml-tray.yaml +++ /dev/null @@ -1,142 +0,0 @@ -name: Release Nearby QML Tray App - -on: - push: - tags: - - 'v*' - workflow_dispatch: - -env: - FORCE_COLOR: true - -permissions: - contents: write - -jobs: - build-and-release-linux: - name: Build and Release Linux Bundle - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - submodules: recursive - - - name: Set up Bazelisk - uses: bazel-contrib/setup-bazel@0.18.0 - with: - # Avoid downloading Bazel every time. - bazelisk-cache: true - # Store build cache per workflow. - disk-cache: ${{ github.workflow }} - # Share repository cache between workflows. - repository-cache: true - - - name: Install Linux build dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - build-essential \ - clang \ - cmake \ - ninja-build \ - pkg-config \ - libssl-dev \ - libsystemd-dev \ - libcurlpp-dev \ - libasound2-dev \ - libunistring-dev \ - libldap-dev \ - libkrb5-dev \ - libgpg-error-dev \ - libbluetooth-dev \ - libxkbcommon-dev \ - patchelf \ - qt6-base-dev \ - qt6-declarative-dev \ - qt6-wayland \ - qt6-tools-dev \ - qt6-tools-dev-tools \ - libqrencode-dev - - - name: Build and install Nearby Sharing API shared library - id: nearby - run: | - INSTALL_PREFIX="$RUNNER_TEMP/nearby-install" - bazel build \ - --check_visibility=false \ - --spawn_strategy=standalone \ - --cxxopt=-std=c++20 \ - --host_cxxopt=-std=c++20 \ - --@com_google_protobuf//bazel/toolchains:prefer_prebuilt_protoc=true \ - --copt='-DGITHUB_BUILD' \ - --copt='-fvisibility=hidden' \ - --cxxopt='-fvisibility-inlines-hidden' \ - //sharing/linux:nearby_sharing_api_shared - BAZEL_BIN="$(bazel info bazel-bin)" - install -d "$INSTALL_PREFIX/lib" - install -d "$INSTALL_PREFIX/include/sharing/linux" - install -m 0755 "$BAZEL_BIN/sharing/linux/libnearby_sharing_api_shared.so" "$INSTALL_PREFIX/lib/" - install -m 0644 "sharing/linux/nearby_sharing_api.h" "$INSTALL_PREFIX/include/sharing/linux/" - echo "nearby_prefix=$INSTALL_PREFIX" >> "$GITHUB_OUTPUT" - - - 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 \ - -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: Install to staging directory - run: cmake --install sharing/linux/qml_tray_app/build - - - name: Stage installer and launcher assets - run: | - STAGING="$RUNNER_TEMP/staging" - install -d "$STAGING/share/applications" - install -d "$STAGING/share/icons/hicolor/256x256/apps" - install -d "$STAGING/include/sharing/linux" - install -m 0755 sharing/linux/qml_tray_app/install_nearby_file_share.sh \ - "$STAGING/install_nearby_file_share.sh" - install -m 0644 sharing/linux/qml_tray_app/nearby-file-share.desktop \ - "$STAGING/share/applications/nearby-file-share.desktop" - install -m 0644 sharing/linux/qml_tray_app/nearby-linux-desktop.png \ - "$STAGING/share/icons/hicolor/256x256/apps/nearby-file-share.png" - install -m 0644 sharing/linux/nearby_sharing_api.h \ - "$STAGING/include/sharing/linux/nearby_sharing_api.h" - - - name: Package tarball - run: | - 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: Generate SHA256 checksums - run: | - cd "$RUNNER_TEMP" - sha256sum "${{ env.tarball_name }}" > "${{ env.tarball_name }}.sha256" - - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: nearby-file-share-linux-x86_64 - path: | - ${{ env.tarball }} - ${{ env.tarball }}.sha256 - - - name: Publish GitHub Release - if: startsWith(github.ref, 'refs/tags/') - uses: softprops/action-gh-release@v2 - with: - generate_release_notes: true - files: | - ${{ env.tarball }} - ${{ env.tarball }}.sha256 diff --git a/sharing/linux/app/BUILD b/sharing/linux/app/BUILD index 1603c20d..5905e6be 100644 --- a/sharing/linux/app/BUILD +++ b/sharing/linux/app/BUILD @@ -93,13 +93,13 @@ qt_cc_binary( sh_binary( name = "appimage", - srcs = ["packaging/package_appimage.sh"], + srcs = ["packaging/package_minimal_appimage.sh"], data = [ ":app", - "icons/smartphone.svg", + "icons/quickshare.svg", "packaging/AppRun", - "packaging/nearby-sharing.desktop", - "packaging/nearby-sharing.metainfo.xml", + "packaging/quickshare.desktop", + "packaging/quickshare.metainfo.xml", "@appimage_runtime_x86_64//file", "@appimagetool_x86_64//file", ], diff --git a/sharing/linux/app/icons/quickshare.svg b/sharing/linux/app/icons/quickshare.svg new file mode 100644 index 00000000..0db590df --- /dev/null +++ b/sharing/linux/app/icons/quickshare.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/sharing/linux/app/packaging/AppRun b/sharing/linux/app/packaging/AppRun index 12fb0232..3af68882 100755 --- a/sharing/linux/app/packaging/AppRun +++ b/sharing/linux/app/packaging/AppRun @@ -10,4 +10,4 @@ export QML2_IMPORT_PATH="$HERE/usr/lib/qt6/qml" export QML_IMPORT_PATH="$HERE/usr/lib/qt6/qml" export QT_QPA_PLATFORM="${QT_QPA_PLATFORM:-wayland;xcb}" -exec "$HERE/usr/bin/nearby-sharing" "$@" +exec "$HERE/usr/bin/quickshare" "$@" diff --git a/sharing/linux/app/packaging/package_minimal_appimage.sh b/sharing/linux/app/packaging/package_minimal_appimage.sh index 6c068202..a1c98911 100755 --- a/sharing/linux/app/packaging/package_minimal_appimage.sh +++ b/sharing/linux/app/packaging/package_minimal_appimage.sh @@ -13,10 +13,10 @@ readonly APPIMAGE_RUNFILES="$WORKSPACE_ROOT/bazel-bin/sharing/linux/app/appimage readonly APPIMAGETOOL="$APPIMAGE_RUNFILES/+http_file+appimagetool_x86_64/file/appimagetool-x86_64.AppImage" readonly RUNTIME="$APPIMAGE_RUNFILES/+http_file+appimage_runtime_x86_64/file/runtime-x86_64" readonly OUTPUT_DIR="$WORKSPACE_ROOT/sharing/linux/dist-minimal" -readonly FINAL_APPDIR="$OUTPUT_DIR/NearbySharing.AppDir" -readonly OUTPUT_APPIMAGE="$OUTPUT_DIR/NearbySharing-x86_64.AppImage" +readonly FINAL_APPDIR="$OUTPUT_DIR/QuickShare.AppDir" +readonly OUTPUT_APPIMAGE="$OUTPUT_DIR/QuickShare-x86_64.AppImage" readonly STAGE="$(mktemp -d /tmp/nearby-minimal-appdir.XXXXXX)" -readonly APPDIR="$STAGE/NearbySharing.AppDir" +readonly APPDIR="$STAGE/QuickShare.AppDir" cleanup() { rm -rf -- "$STAGE" @@ -49,7 +49,7 @@ mkdir -p \ "$APPDIR/usr/share/icons/hicolor/scalable/apps" \ "$APPDIR/usr/share/metainfo" -install -m 0755 "$BINARY" "$APPDIR/usr/bin/nearby-sharing" +install -m 0755 "$BINARY" "$APPDIR/usr/bin/quickshare" copy_qt_library() { local name="$1" @@ -211,20 +211,20 @@ while true; do done install -m 0644 \ - "$WORKSPACE_ROOT/sharing/linux/app/packaging/nearby-sharing.desktop" \ - "$APPDIR/usr/share/applications/nearby-sharing.desktop" + "$WORKSPACE_ROOT/sharing/linux/app/packaging/quickshare.desktop" \ + "$APPDIR/usr/share/applications/quickshare.desktop" install -m 0644 \ - "$WORKSPACE_ROOT/sharing/linux/app/packaging/nearby-sharing.metainfo.xml" \ - "$APPDIR/usr/share/metainfo/nearby-sharing.metainfo.xml" + "$WORKSPACE_ROOT/sharing/linux/app/packaging/quickshare.metainfo.xml" \ + "$APPDIR/usr/share/metainfo/quickshare.metainfo.xml" install -m 0644 \ - "$WORKSPACE_ROOT/sharing/linux/app/icons/smartphone.svg" \ - "$APPDIR/usr/share/icons/hicolor/scalable/apps/nearby-sharing.svg" + "$WORKSPACE_ROOT/sharing/linux/app/icons/quickshare.svg" \ + "$APPDIR/usr/share/icons/hicolor/scalable/apps/quickshare.svg" cp \ - "$APPDIR/usr/share/applications/nearby-sharing.desktop" \ + "$APPDIR/usr/share/applications/quickshare.desktop" \ "$APPDIR/" cp \ - "$APPDIR/usr/share/icons/hicolor/scalable/apps/nearby-sharing.svg" \ + "$APPDIR/usr/share/icons/hicolor/scalable/apps/quickshare.svg" \ "$APPDIR/" printf '%s\n' \ @@ -247,7 +247,7 @@ printf '%s\n' \ 'export QML2_IMPORT_PATH="$HERE/usr/lib/qt6/qml"' \ 'export QT_QPA_PLATFORM="${QT_QPA_PLATFORM:-wayland;xcb}"' \ '' \ - 'exec "$HERE/usr/bin/nearby-sharing" "$@"' \ + 'exec "$HERE/usr/bin/quickshare" "$@"' \ >"$APPDIR/AppRun" chmod 0755 "$APPDIR/AppRun" diff --git a/sharing/linux/app/packaging/nearby-sharing.desktop b/sharing/linux/app/packaging/quickshare.desktop similarity index 70% rename from sharing/linux/app/packaging/nearby-sharing.desktop rename to sharing/linux/app/packaging/quickshare.desktop index 76e58aab..c1290260 100644 --- a/sharing/linux/app/packaging/nearby-sharing.desktop +++ b/sharing/linux/app/packaging/quickshare.desktop @@ -1,9 +1,9 @@ [Desktop Entry] Type=Application -Name=Nearby Sharing +Name=QuickShare Comment=Share files with nearby devices -Exec=nearby-sharing -Icon=nearby-sharing +Exec=quickshare +Icon=quickshare Categories=Network;FileTransfer; Terminal=false StartupNotify=true diff --git a/sharing/linux/app/packaging/nearby-sharing.metainfo.xml b/sharing/linux/app/packaging/quickshare.metainfo.xml similarity index 64% rename from sharing/linux/app/packaging/nearby-sharing.metainfo.xml rename to sharing/linux/app/packaging/quickshare.metainfo.xml index a883fa41..ee952b1d 100644 --- a/sharing/linux/app/packaging/nearby-sharing.metainfo.xml +++ b/sharing/linux/app/packaging/quickshare.metainfo.xml @@ -1,16 +1,16 @@ - com.google.nearby.sharing + com.google.quickshare CC0-1.0 Apache-2.0 - Nearby Sharing + QuickShare Share files with nearby devices

- Nearby Sharing discovers compatible devices and transfers files over + QuickShare discovers compatible devices and transfers files over local wireless connections.

https://github.com/google/nearby - nearby-sharing.desktop + quickshare.desktop