From 26d165245363dad558b7a823a238f0ff191a8c3f Mon Sep 17 00:00:00 2001 From: Soumyadeep Ghosh Date: Wed, 19 Feb 2025 15:41:52 +0530 Subject: [PATCH 1/3] ci: add secrets support --- .github/workflows/snap.yaml | 6 ++---- snap/snapcraft.yaml | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/snap.yaml b/.github/workflows/snap.yaml index 714df2d..2e6fdc5 100644 --- a/.github/workflows/snap.yaml +++ b/.github/workflows/snap.yaml @@ -20,12 +20,11 @@ jobs: with: channel: "stable" flutter-version: ${{env.FLUTTER_VERSION}} + - run: echo ${{ secrets.API_KEY }} > secrets.txt - run: sudo apt update - run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip libunwind-dev libsecret-1-dev - run: flutter pub get - uses: snapcore/action-build@v1 - env: - API_KEY: ${{ secrets.API_KEY }} id: build - uses: snapcore/action-publish@v1 if: steps.build.outcome == 'success' @@ -45,13 +44,12 @@ jobs: with: channel: "main" flutter-version: ${{env.FLUTTER_VERSION}} + - run: echo ${{ secrets.API_KEY }} > secrets.txt - run: sudo apt update - run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip libunwind-dev libsecret-1-dev - run: flutter pub get - uses: snapcore/action-build@v1 id: build - env: - API_KEY: ${{ secrets.API_KEY }} - uses: snapcore/action-publish@v1 if: steps.build.outcome == 'success' env: diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 5fa8a59..7f4c1a8 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -45,12 +45,11 @@ parts: plugin: nil source: . after: [flutter-git] - override-build: | set -eu flutter doctor flutter pub get - flutter build linux --release -v + flutter build linux --release -v --dart-define=API_KEY="$(cat secrets.txt)" mkdir -p $CRAFT_PART_INSTALL/bin/ cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/bin/ From 24a40d0e98b0b97d7023359ed093602765fa121b Mon Sep 17 00:00:00 2001 From: Soumyadeep Ghosh Date: Wed, 19 Feb 2025 15:44:59 +0530 Subject: [PATCH 2/3] ci: clear up unneeded files --- .github/workflows/snap.yaml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/snap.yaml b/.github/workflows/snap.yaml index 2e6fdc5..da8ab31 100644 --- a/.github/workflows/snap.yaml +++ b/.github/workflows/snap.yaml @@ -16,14 +16,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 5 - - uses: subosito/flutter-action@v2 - with: - channel: "stable" - flutter-version: ${{env.FLUTTER_VERSION}} - run: echo ${{ secrets.API_KEY }} > secrets.txt - - run: sudo apt update - - run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip libunwind-dev libsecret-1-dev - - run: flutter pub get - uses: snapcore/action-build@v1 id: build - uses: snapcore/action-publish@v1 @@ -40,14 +33,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 5 - - uses: subosito/flutter-action@v2 - with: - channel: "main" - flutter-version: ${{env.FLUTTER_VERSION}} - run: echo ${{ secrets.API_KEY }} > secrets.txt - - run: sudo apt update - - run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip libunwind-dev libsecret-1-dev - - run: flutter pub get - uses: snapcore/action-build@v1 id: build - uses: snapcore/action-publish@v1 From d9339caba84593f12a88fa6bf0143e483d8db2ca Mon Sep 17 00:00:00 2001 From: Soumyadeep Ghosh Date: Wed, 19 Feb 2025 15:52:28 +0530 Subject: [PATCH 3/3] snap: update to core24 --- snap/snapcraft.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 7f4c1a8..e69e5c8 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,6 +1,6 @@ name: pulse title: Pulse -base: core22 +base: core24 version: git contact: frederik.feichtmeier@gmail.com summary: Weather app for the Linux Desktop. @@ -13,9 +13,9 @@ icon: snap/gui/pulse.png grade: stable confinement: strict -architectures: - - build-on: amd64 - - build-on: arm64 +platforms: + amd64: + arm64: parts: flutter-git: