Skip to content

What is this

What is this #4763

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' || 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/[email protected]
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@v4
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@v4
with:
distribution: "temurin"
java-version: 11
- name: Build with Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: assembleDebug --stacktrace
- name: Upload fdroid artifact
uses: actions/upload-artifact@v4
with:
name: Amaze-Fdroid-debug
path: app/build/outputs/apk/fdroid/debug/app-fdroid-debug.apk
- name: Upload play artifact
uses: actions/upload-artifact@v4
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.