-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
92 lines (83 loc) · 2.4 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
image: cirrusci/flutter:beta
before_script:
- echo "$keybase64" > ./keybase64
- mkdir -p /builds/
- base64 -d ./keybase64 > /builds/android.jks
- echo "$KEYPROPERTIES" > ./android/key.properties
- export VERSION=$(cat pubspec.yaml | grep version | awk '{ print $2 }' | cut -f1 -d "+")
stages:
- build
- deploy
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- guerrilla_mail-*
build:web:
stage: build
script:
- flutter config --enable-web
- flutter pub get
- set +o pipefail
- flutter build web --base-href /guerrilla_mail/
- cp -r build/web guerrilla_mail-web-$VERSION
artifacts:
paths:
- guerrilla_mail-*
build:apk:
stage: build
script:
- set +o pipefail
- flutter build apk
- set -o pipefail
- mv build/app/outputs/apk/release/app-release.apk guerrilla-mail-$VERSION.apk
artifacts:
paths:
- guerrilla-mail-*.apk
build:debian:
stage: build
image: ubuntu
script: |
export DEBIAN_FRONTEND=noninteractive
# required to upgrade ubuntu base due to incompatible libraries
apt update -qq
apt install -y -qq wget tar unzip zip lib32stdc++6 lib32z1 git clang cmake ninja-build pkg-config libgtk-3-dev curl dh-make meson
# flutter sdk setup
git clone -b beta https://github.com/flutter/flutter.git /flutter
export PATH=$PATH:/flutter/bin
sed -i "s/DATE/$(date -R)/g" debian/changelog
sed -i "s/VERSION/$VERSION/g" debian/changelog
dpkg-buildpackage
mv ../guerrilla-mail_*.deb guerrilla-mail-$VERSION.deb
artifacts:
paths:
- guerrilla-mail-*.deb
build:linux:
stage: build
image: snapcore/snapcraft:edge
script: |
# required to upgrade ubuntu base due to incompatible libraries
sed -i "s/xenial/focal/g" /etc/apt/sources.list
apt update -qq
apt install -y -qq wget tar unzip zip lib32stdc++6 lib32z1 git clang cmake ninja-build pkg-config libgtk-3-dev curl
# flutter sdk setup
git clone -b beta https://github.com/flutter/flutter.git /flutter
export PATH=$PATH:/flutter/bin
flutter config --enable-linux-desktop
flutter build linux
cp -r build/linux/x64/release/bundle guerrilla-mail-linux-$VERSION
artifacts:
paths:
- guerrilla-mail-linux-*
pages:
stage: deploy
image: alpine:latest
script:
- mkdir public
- cp -r guerrilla_mail-web-$VERSION/* public/
dependencies:
- build:web
artifacts:
paths:
- public
only:
- main