feat: Publish as snap

This commit is contained in:
Christian Pauly 2020-10-04 18:39:07 +02:00
parent 772ff33d8e
commit 46590d7f2b
2 changed files with 78 additions and 0 deletions

View File

@ -181,3 +181,56 @@ pages:
- public - public
only: only:
- main - main
snap:amd64:
stage: build
image: ubuntu:20.04
except:
- coverage
script:
- apt-get update -qy
- apt-get install -y snapcraft
- snapcraft --debug
artifacts:
paths:
- './*.snap'
when: on_success
expire_in: 1 week
snap:publish-candidate:
stage: publish
image: ubuntu:20.04
only:
- main
script:
- apt-get update -qy
- apt-get install -y snapcraft curl
- snapcraft
- echo $SNAPCRAFT_LOGIN_FILE | base64 --decode --ignore-garbage > snapcraft.login
- snapcraft login --with snapcraft.login
- snapcraft push --release=candidate *.snap
- snapcraft logout
artifacts:
paths:
- './*.snap'
when: on_success
expire_in: 1 week
snap:publish:
stage: publish
image: ubuntu:20.04
only:
- tags
script:
- apt-get update -qy
- apt-get install -y snapcraft curl
- snapcraft
- echo $SNAPCRAFT_LOGIN_FILE | base64 --decode --ignore-garbage > snapcraft.login
- snapcraft login --with snapcraft.login
- snapcraft push --release=stable *.snap
- snapcraft logout
artifacts:
paths:
- './*.snap'
when: on_success
expire_in: 1 week

25
snap/snapcraft.yaml Normal file
View File

@ -0,0 +1,25 @@
name: fluffychat
version: 0.1.0
summary: Chat with your friends.
description: Chat with your friends.
icon: assets/logo.png
confinement: strict
base: core18
grade: stable
apps:
fluffychat:
command: fluffychat
extensions: [flutter-dev]
plugs:
- network
- home
parts:
fluffychat:
source: .
plugin: flutter
flutter-target: lib/main.dart
stage-packages:
- libsqlite3-0
- libolm3