Skip to content

Commit

Permalink
ci: use special flutter version on snap (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie authored May 17, 2024
1 parent 0583e4a commit b30cd78
Showing 1 changed file with 33 additions and 6 deletions.
39 changes: 33 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,6 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Setup LXD
uses: canonical/[email protected]
with:
Expand Down Expand Up @@ -298,20 +295,50 @@ jobs:
apps:
gopeed:
command: gopeed
command: bin/gopeed
extensions: [gnome]
plugs:
- network
slots:
- dbus-gopeed
parts:
flutter-git:
source: https://github.com/flutter/flutter.git
source-tag: $FLUTTER_VERSION
source-depth: 1
plugin: nil
override-build: |
mkdir -p \$CRAFT_PART_INSTALL/usr/bin
mkdir -p \$CRAFT_PART_INSTALL/usr/libexec
cp -r \$CRAFT_PART_SRC \$CRAFT_PART_INSTALL/usr/libexec/flutter
ln -s \$CRAFT_PART_INSTALL/usr/libexec/flutter/bin/flutter \$CRAFT_PART_INSTALL/usr/bin/flutter
ln -s \$SNAPCRAFT_PART_INSTALL/usr/libexec/flutter/bin/dart \$SNAPCRAFT_PART_INSTALL/usr/bin/dart
\$CRAFT_PART_INSTALL/usr/bin/flutter doctor
build-packages:
- clang
- cmake
- curl
- libgtk-3-dev
- ninja-build
- unzip
- xz-utils
- zip
override-prime: ''
gopeed:
after: [flutter-git]
source: .
plugin: flutter
plugin: nil
stage-packages:
- libgtk-3-dev
- libappindicator3-dev
flutter-target: lib/main.dart
override-build: |
# work around pub get stack overflow # https://github.com/dart-lang/sdk/issues/51068#issuecomment-1396588253
set +e
dart pub get
set -eux
flutter build linux --release -v
mkdir -p \$CRAFT_PART_INSTALL/bin/
cp -r build/linux/*/release/bundle/* \$CRAFT_PART_INSTALL/bin/
EOF
cp linux/assets/com.gopeed.Gopeed.desktop snap/gui/gopeed.desktop
Expand Down

0 comments on commit b30cd78

Please sign in to comment.