-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (58 loc) · 1.71 KB
/
Copy pathflutter.yml
File metadata and controls
64 lines (58 loc) · 1.71 KB
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
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
# This workflow contains a single job called "build"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '2.5.3'
- run: |
cd flutter_app
flutter pub get
# - run: |
# cd flutter_app
# flutter test
- run: |
cd flutter_app
flutter build apk
- uses: actions/upload-artifact@v3
with:
name: android.apk
path: flutter_app/build/app/outputs/flutter-apk/app-release.apk
- run: |
cd flutter_app
flutter build appbundle
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@master
with:
name: android.apk
path: ./Server/public/downloads
- name: Deploy project with SSH
uses : easingthemes/ssh-deploy@v2.1.4
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
SOURCE: "./"
TARGET: "~/PcController"