Skip to content

Commit

Permalink
Add snapcraft config (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnurmi authored May 14, 2023
1 parent b771384 commit 1bea29d
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@ jobs:
- run: flutter pub get
- run: flutter build macos -v

snap:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: snapcore/action-build@v1
id: snapcraft
- uses: actions/upload-artifact@v3
if: github.event_name == 'workflow_dispatch'
with:
name: 'snap'
path: ${{steps.snapcraft.outputs.snap}}

test:
runs-on: ubuntu-22.04
steps:
Expand Down
9 changes: 9 additions & 0 deletions assets/calculator.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=Calculator
Comment=Calculator example
Keywords=flutter;yaru;example;
Exec=calculator
Terminal=false
Categories=Example;
3 changes: 3 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: calculator
description: Calculator example
publish_to: 'none'

environment:
Expand Down Expand Up @@ -28,3 +29,5 @@ dev_dependencies:
flutter:
generate: true
uses-material-design: true
assets:
- assets/
24 changes: 24 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: calculator
version: git
summary: Calculator
description: Calculator example
confinement: strict
base: core22
grade: stable
license: GPL-3.0+
architectures:
- build-on: amd64
build-for: amd64
- build-on: arm64
build-for: arm64

parts:
calculator:
plugin: flutter
source: .

apps:
calculator:
command: calculator
desktop: data/flutter_assets/assets/calculator.desktop
extensions: [gnome]

0 comments on commit 1bea29d

Please sign in to comment.