-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
62 lines (60 loc) · 2.46 KB
/
android-debug-artifact-ondemand.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
name: Android Debug artifact ondemand
on:
pull_request:
types: [opened]
issue_comment:
types: [created]
jobs:
apk:
runs-on: ubuntu-20.04
if: github.event.comment.body == 'Build test apk' && (github.actor == 'VishalNehra' || github.actor == 'TranceLove' || github.actor == 'EmmanuelMess' || github.actor == 'VishnuSanal')
steps:
- name: Acknowledge the request with thumbs up reaction
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ github.event.comment.id }}
reactions: '+1'
- name: Github API Request
id: request
uses: octokit/request-action@v2.0.2
with:
route: ${{ github.event.issue.pull_request.url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get PR informations
id: pr_data
run: |
echo "::set-output name=repo_name::${{ fromJson(steps.request.outputs.data).head.repo.full_name }}"
echo "::set-output name=repo_clone_url::${{ fromJson(steps.request.outputs.data).head.repo.clone_url }}"
echo "::set-output name=repo_ssh_url::${{ fromJson(steps.request.outputs.data).head.repo.ssh_url }}"
- name: Checkout PR Branch
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{fromJson(steps.request.outputs.data).head.repo.full_name}}
ref: ${{fromJson(steps.request.outputs.data).head.ref}}
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 11
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: assembleDebug --stacktrace
- name: Upload fdroid artifact
uses: actions/upload-artifact@v3
with:
name: Amaze-Fdroid-debug
path: app/build/outputs/apk/fdroid/debug/app-fdroid-debug.apk
- name: Upload play artifact
uses: actions/upload-artifact@v3
with:
name: Amaze-Play-debug
path: app/build/outputs/apk/play/debug/app-play-debug.apk
- name: Notify the user with a comment once the APK is uploaded # TODO: update this with the link to the artifacts
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.issue.number }}
body: |
The requested APKs has been built. Please find them from the artifacts section of this PR.