-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 1.39 KB
/
main.yaml
File metadata and controls
38 lines (32 loc) · 1.39 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
name: Build and Deploy AgriTech Partner
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.JS
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Build release APK & send to telegram
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" -d chat_id="-1001774328228" \
-d "disable_web_page_preview=true" \
-d "parse_mode=markdown" \
-d text="🤖 build started 🤖"
cd android && ./gradlew assembleRelease && mv app/build/outputs/apk/release/app-release.apk app-release.apk
curl --progress-bar -F document=@"app-release.apk" "https://api.telegram.org/bot${BOT_TOKEN}/sendDocument" \
-F chat_id="-1001774328228" \
-F "disable_web_page_preview=true" \
-F "parse_mode=Markdown" \
-F caption="Build for [${GITHUB_SHA}](https://github.com/alok8bb/AgriTechPartner/commit/${GITHUB_SHA})"