-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.drone.yml
120 lines (110 loc) · 2.36 KB
/
.drone.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
kind: pipeline
type: docker
name: flutter-multi-platform
steps:
# Clone repository
- name: clone
image: plugins/git
settings:
depth: 50
# Setup environment and install dependencies
- name: install-dependencies
image: cirrusci/flutter:stable
commands:
- flutter pub get
# Build APK for Android
- name: build-android
image: cirrusci/flutter:stable
commands:
- flutter build apk --release
when:
event:
- push
- pull_request
branch:
- main
# Build iOS App
- name: build-ios
image: cirrusci/flutter:stable
commands:
- flutter build ios --release --no-codesign
when:
event:
- push
- pull_request
branch:
- main
# Build for Web (PWA)
- name: build-web
image: cirrusci/flutter:stable
commands:
- flutter build web --release
when:
event:
- push
- pull_request
branch:
- main
# Build for Linux Desktop
- name: build-linux
image: cirrusci/flutter:stable
commands:
- flutter build linux --release
when:
event:
- push
- pull_request
branch:
- main
# Build for macOS Desktop
- name: build-macos
image: cirrusci/flutter:stable
commands:
- flutter build macos --release
when:
event:
- push
- pull_request
branch:
- main
# Build for Windows Desktop
- name: build-windows
image: cirrusci/flutter:stable
commands:
- flutter build windows --release
when:
event:
- push
- pull_request
branch:
- main
# Deploy using SSH (Docker)
- name: deploy
image: plugins/ssh
environment:
SSH_KEY:
from_secret: ssh_key
DOCKER_HOST: tcp://your-docker-host:2376
DOCKER_TLS_VERIFY: "1"
DOCKER_CERT_PATH: "/path/to/docker/certs"
settings:
host: your-server.com
username: your-username
port: 22
script:
- echo "Deploying Flutter app via SSH"
- docker pull your-docker-image:latest
- docker stop your-container || true
- docker rm your-container || true
- docker run -d --name your-container your-docker-image:latest
when:
event:
- push
branch:
- main
trigger:
branch:
- main
event:
- push
- pull_request