diff --git a/.github/workflows/snap.yaml b/.github/workflows/snap.yaml index 714df2d..da8ab31 100644 --- a/.github/workflows/snap.yaml +++ b/.github/workflows/snap.yaml @@ -16,16 +16,8 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 5 - - uses: subosito/flutter-action@v2 - with: - channel: "stable" - flutter-version: ${{env.FLUTTER_VERSION}} - - 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 + - run: echo ${{ secrets.API_KEY }} > secrets.txt - uses: snapcore/action-build@v1 - env: - API_KEY: ${{ secrets.API_KEY }} id: build - uses: snapcore/action-publish@v1 if: steps.build.outcome == 'success' @@ -41,17 +33,9 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 5 - - uses: subosito/flutter-action@v2 - with: - channel: "main" - flutter-version: ${{env.FLUTTER_VERSION}} - - 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 + - run: echo ${{ secrets.API_KEY }} > secrets.txt - 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..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: @@ -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/