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