-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (68 loc) · 2.32 KB
/
release_test_apk.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
name: Master Release For Test
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
name: Release New Master Apk
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter pub get
- run: flutter build apk
- name: Upload APK to Google Drive
uses: adityak74/google-drive-upload-git-action@main
with:
credentials: ${{ secrets.SERVICE_KEY }}
filename: build/app/outputs/apk/release/app-release.apk
folderId: ${{ secrets.FOLDER_ID }}
name: v1.0.${{github.run_number}}.apk
- name: Send mail
uses: betterfor/action-send-mail@main
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{secrets.MAIL_USERNAME}}
password: ${{secrets.MAIL_PASSWORD}}
subject: Trading v1.0.${{github.run_number}} Build Successfully
to: ${{secrets.MAIL_TO}}
from: ${{secrets.MAIL_USERNAME}}
body: Trading v1.0.${{github.repository}} completed successfully!
html_body: |
<html>
<body>
<p>Hello sir,</p>
<p>Please check attachment for Trading v1.0.${{github.run_number}} App</p>
<p>${{github.event.client_payload.ReleaseTitle}}</p>
<p>Check latest apk in : <a href="${{ secrets.GOOGLE_DRIVE_FOLDER_URL }}">Drive</a></p>
<p>Thank you</p>
</body>
</html>
reply_to: ${{secrets.MAIL_USERNAME}}
in_reply_to: ${{secrets.MAIL_USERNAME}}
convert_markdown: true
priority: low
- name: Push Release to Github
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/apk/release/app-release.apk"
tag: v1.0.${{github.run_number}}
token: ${{ secrets.TOKEN }}
- name: Upload artifact
uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: app-release
path: build/app/outputs/apk/release/app-release.apk