Skip to content

Commit 61f88a4

Browse files
authored
chore: fixes to ci and snap (#18)
* ci: add secrets support * ci: clear up unneeded files * snap: update to core24
1 parent 848b76f commit 61f88a4

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

.github/workflows/snap.yaml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,8 @@ jobs:
1616
- uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 5
19-
- uses: subosito/flutter-action@v2
20-
with:
21-
channel: "stable"
22-
flutter-version: ${{env.FLUTTER_VERSION}}
23-
- run: sudo apt update
24-
- run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip libunwind-dev libsecret-1-dev
25-
- run: flutter pub get
19+
- run: echo ${{ secrets.API_KEY }} > secrets.txt
2620
- uses: snapcore/action-build@v1
27-
env:
28-
API_KEY: ${{ secrets.API_KEY }}
2921
id: build
3022
- uses: snapcore/action-publish@v1
3123
if: steps.build.outcome == 'success'
@@ -41,17 +33,9 @@ jobs:
4133
- uses: actions/checkout@v4
4234
with:
4335
fetch-depth: 5
44-
- uses: subosito/flutter-action@v2
45-
with:
46-
channel: "main"
47-
flutter-version: ${{env.FLUTTER_VERSION}}
48-
- run: sudo apt update
49-
- run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip libunwind-dev libsecret-1-dev
50-
- run: flutter pub get
36+
- run: echo ${{ secrets.API_KEY }} > secrets.txt
5137
- uses: snapcore/action-build@v1
5238
id: build
53-
env:
54-
API_KEY: ${{ secrets.API_KEY }}
5539
- uses: snapcore/action-publish@v1
5640
if: steps.build.outcome == 'success'
5741
env:

snap/snapcraft.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: pulse
22
title: Pulse
3-
base: core22
3+
base: core24
44
version: git
55
66
summary: Weather app for the Linux Desktop.
@@ -13,9 +13,9 @@ icon: snap/gui/pulse.png
1313

1414
grade: stable
1515
confinement: strict
16-
architectures:
17-
- build-on: amd64
18-
- build-on: arm64
16+
platforms:
17+
amd64:
18+
arm64:
1919

2020
parts:
2121
flutter-git:
@@ -45,12 +45,11 @@ parts:
4545
plugin: nil
4646
source: .
4747
after: [flutter-git]
48-
4948
override-build: |
5049
set -eu
5150
flutter doctor
5251
flutter pub get
53-
flutter build linux --release -v
52+
flutter build linux --release -v --dart-define=API_KEY="$(cat secrets.txt)"
5453
mkdir -p $CRAFT_PART_INSTALL/bin/
5554
cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/bin/
5655

0 commit comments

Comments
 (0)