From b440d564013992c773c67a6a6a586590e357928a Mon Sep 17 00:00:00 2001 From: krille-chan Date: Tue, 19 Nov 2024 17:11:46 +0100 Subject: [PATCH] build: Snapcraft from local build file --- .github/workflows/main_deploy.yaml | 23 +++++++++++++++++++++++ snap/snapcraft.yaml | 8 +++----- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main_deploy.yaml b/.github/workflows/main_deploy.yaml index 1a817f006..4a8e0f39d 100644 --- a/.github/workflows/main_deploy.yaml +++ b/.github/workflows/main_deploy.yaml @@ -80,3 +80,26 @@ jobs: bundle update fastlane bundle exec fastlane deploy_internal_test cd .. + + deploy_snapcraft: + strategy: + matrix: + arch: [ x64, arm64 ] + env: + SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }} + runs-on: ${{ matrix.arch == 'arm64' && 'self-hosted' || 'ubuntu-latest'}} + steps: + - uses: actions/checkout@v4 + - run: cat .github/workflows/versions.env >> $GITHUB_ENV + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install git wget curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 libssl-dev libwebkit2gtk-4.1-dev -y + - name: Install Flutter + run: | + git clone --branch ${{ env.FLUTTER_VERSION }} https://github.com/flutter/flutter.git + ./flutter/bin/flutter doctor + - run: ./flutter/bin/flutter pub get + - run: ./flutter/bin/flutter build linux --target-platform linux-${{ matrix.arch }} --release + - name: Install Snapcraft + uses: samuelmeuli/action-snapcraft@v3 + - run: snapcraft + - run: snapcraft push ./*.snap \ No newline at end of file diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 096a1353c..55d76a165 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -71,11 +71,9 @@ parts: - zenity-integration fluffychat: - plugin: flutter - source: . - build-packages: - - libjsoncpp-dev - - curl + plugin: dump + source: ./build/linux/*/release + source-type: local stage-packages: - libsecret-1-dev - libjsoncpp-dev