File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Nightly Build
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 0 * * *' # once a day
6+
7+ jobs :
8+ evaluateChanges :
9+ name : Evaluate changes for run or skipping nightly build
10+ runs-on : ubuntu-latest
11+ outputs :
12+ SHOULD_BUILD : ${{ steps.check.outputs.shouldBuild }}
13+ steps :
14+ - uses : actions/checkout@v2
15+ with :
16+ fetch-depth : 1
17+
18+ - name : Check
19+ id : check
20+ run : |
21+ if [[ $(git rev-list --after="24 hours" master) ]]; then
22+ echo ::set-output name=shouldBuild::false
23+ else
24+ echo ::set-output name=shouldBuild::true
25+ fi
26+
27+ - name : Print evaluation result
28+ run : echo ${{steps.check.outputs.shouldBuild}}
29+
30+ nightlyBuild :
31+ name : Generate Nightly Build
32+ runs-on : ubuntu-latest
33+ needs : evaluateChanges
34+ if : ${{needs.evaluateChanges.outputs.SHOULD_BUILD}}
35+ steps :
36+ - uses : actions/checkout@v2
37+ with :
38+ fetch-depth : 1
39+
40+ - name : set up JDK
41+ uses : actions/setup-java@v2
42+ with :
43+ java-version : ' 11'
44+ distribution : ' adopt'
45+ cache : gradle
46+
47+ - name : Decode google-services.json
48+ env :
49+ FIREBASE_SECRET : ${{ secrets.FIREBASE_SECRET }}
50+ run : echo $FIREBASE_SECRET > ${{ github.workspace }}/app/google-services.json
51+
52+ - name : Build Apk
53+ run : ./gradlew assembleProductionDebug --stacktrace
54+
55+ - name : Finding Apk
56+ id : apk_finder
57+ run : echo ::set-output name=APK_PATH::`find . -type f -iname *.apk`
58+
59+ - name : Send Apk in Telegram
60+ 61+ with :
62+ to : ${{ secrets.TELEGRAM_TO }}
63+ token : ${{ secrets.TELEGRAM_TOKEN }}
64+ document : ${{ steps.apk_finder.outputs.APK_PATH }}
You can’t perform that action at this time.
0 commit comments