added packaging workflow to github action and updated icon

This commit is contained in:
Lasan Mahaliyana
2026-07-20 09:25:58 +05:30
parent 70ae21a527
commit d474becefe
8 changed files with 139 additions and 167 deletions
@@ -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
@@ -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
+4 -4
View File
@@ -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",
],
+10
View File
@@ -0,0 +1,10 @@
<svg width="510" height="512" viewBox="0 0 510 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="510" height="512" rx="90" fill="url(#paint0_linear_1_2)"/>
<path d="M226.583 269.458C232.578 277.472 240.226 284.103 249.008 288.901C257.791 293.7 267.502 296.553 277.484 297.268C287.467 297.983 297.486 296.543 306.863 293.045C316.239 289.547 324.754 284.074 331.829 276.996L373.704 235.121C386.417 221.958 393.452 204.328 393.293 186.029C393.134 167.73 385.794 150.226 372.854 137.286C359.914 124.346 342.409 117.006 324.11 116.847C305.811 116.688 288.182 123.722 275.019 136.435L251.01 160.304M282.417 241.542C276.422 233.528 268.774 226.897 259.992 222.099C251.209 217.3 241.498 214.447 231.515 213.732C221.533 213.017 211.514 214.457 202.137 217.955C192.761 221.453 184.246 226.926 177.171 234.004L135.296 275.879C122.583 289.042 115.548 306.672 115.707 324.971C115.866 343.27 123.206 360.774 136.146 373.714C149.086 386.654 166.591 393.994 184.89 394.153C203.189 394.312 220.818 387.278 233.981 374.565L257.85 350.696" stroke="#163142" stroke-width="22" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="paint0_linear_1_2" x1="12.3857" y1="21.2114" x2="491.476" y2="500.616" gradientUnits="userSpaceOnUse">
<stop stop-color="#9FDBFF"/>
<stop offset="1" stop-color="white"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

+1 -1
View File
@@ -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" "$@"
@@ -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"
@@ -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
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>com.google.nearby.sharing</id>
<id>com.google.quickshare</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>Apache-2.0</project_license>
<name>Nearby Sharing</name>
<name>QuickShare</name>
<summary>Share files with nearby devices</summary>
<description>
<p>
Nearby Sharing discovers compatible devices and transfers files over
QuickShare discovers compatible devices and transfers files over
local wireless connections.
</p>
</description>
<url type="homepage">https://github.com/google/nearby</url>
<launchable type="desktop-id">nearby-sharing.desktop</launchable>
<launchable type="desktop-id">quickshare.desktop</launchable>
</component>