-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathandroid-debug-artifact-ondemand.yml
More file actions
53 lines (51 loc) · 1.95 KB
/
android-debug-artifact-ondemand.yml
File metadata and controls
53 lines (51 loc) · 1.95 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Android Debug artifact ondemand
on:
pull_request:
types: [opened]
issue_comment:
types: [created]
jobs:
apk:
runs-on: ubuntu-latest
if: github.event.comment.body == 'Build test apk' && github.actor == 'VishalNehra' || github.actor == 'TranceLove' || github.actor == 'EmmanuelMess'
steps:
- 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=branch::${{ fromJson(steps.request.outputs.data).head.ref }}"
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@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ fromJson(steps.request.outputs.data).head.repo.full_name }}
ref: ${{ steps.pr_data.outputs.branch }}
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Gradle
run: |
echo Run on-demand by ${GITHUB_ACTOR}
bash ./gradlew assembleDebug --stacktrace
env:
TZ: UTC
- name: Upload fdroid artifact
uses: actions/upload-artifact@v2
with:
name: Amaze-Fdroid-debug
path: app/build/outputs/apk/fdroid/debug/app-fdroid-debug.apk
- name: Upload play artifact
uses: actions/upload-artifact@v2
with:
name: Amaze-Play-debug
path: app/build/outputs/apk/play/debug/app-play-debug.apk