-
Notifications
You must be signed in to change notification settings - Fork 109
72 lines (68 loc) · 2.44 KB
/
android.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
71
72
name: Omega CI
on:
push:
branches: [ A-12 ]
pull_request:
branches: [ A-12 ]
jobs:
# send-start-notification:
# runs-on: ubuntu-latest
# continue-on-error: true
# if: github.event_name == 'push'
# steps:
# - name: Send start notification
# uses: appleboy/[email protected]
# with:
# to: ${{ secrets.TELEGRAM_CHAT_ID }}
# token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
# message: New push to “Omega Launcher”. Building debug APK…
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: set up JDK 11
uses: actions/[email protected]
with:
java-version: 1.11
- uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Compile with Gradle
run: ./gradlew assembleAospWithQuickstepOmega
- name: Save name of our Artifact
id: set-result-artifact
run: |
ARTIFACT_PATHNAME_APK=$(ls build/outputs/apk/aospWithQuickstepOmega/debug/*.apk | head -n 1)
ARTIFACT_NAME_APK=$(basename $ARTIFACT_PATHNAME_APK)
echo "ARTIFACT_NAME_APK is " ${ARTIFACT_NAME_APK}
echo "ARTIFACT_PATHNAME_APK=${ARTIFACT_PATHNAME_APK}" >> $GITHUB_ENV
echo "ARTIFACT_NAME_APK=${ARTIFACT_NAME_APK}" >> $GITHUB_ENV
- uses: actions/upload-artifact@v2
with:
name: ${{ env.ARTIFACT_NAME_APK }}
path: ${{ env.ARTIFACT_PATHNAME_APK }}
# send-end-notification:
# runs-on: ubuntu-latest
# needs: build
# if: github.event_name == 'push'
# steps:
# - name: Download artifact
# uses: actions/download-artifact@v2
# with:
# name: ${{ env.ARTIFACT_NAME_APK }}
# path: ${{ env.ARTIFACT_PATHNAME_APK }}
# - uses: technote-space/[email protected]
# - name: Send notification
# uses: appleboy/[email protected]
# with:
# to: ${{ secrets.TELEGRAM_CHAT_ID }}
# token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
# document: artifacts/debug-apk/**.apk
# message: Build finished with status “${{ env.WORKFLOW_CONCLUSION }}”. Uploading APK if available…