Update README.md #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |