-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build Pull Request APK | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
apk: | ||
permissions: | ||
# Required to upload/save artifact, otherwise you'll get | ||
# "Error: Resource not accessible by integration" | ||
contents: write | ||
# Required to post comment, otherwise you'll get | ||
# "Error: Resource not accessible by integration" | ||
pull-requests: write | ||
|
||
name: Generate APK for pull request | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt | ||
java-version: 11 | ||
|
||
- name: Make Gradle wrapper executable | ||
run: chmod +x ./gradlew | ||
|
||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Build debug APK | ||
uses: gradle/gradle-build-action@v2.7.0 | ||
with: | ||
arguments: assembleDebug | ||
env: | ||
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | ||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | ||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | ||
|
||
- name: Add pull request artifact | ||
uses: gavv/pull-request-artifacts@v1.1.0 | ||
with: | ||
# Commit hash that triggered PR | ||
commit: ${{ github.event.pull_request.head.sha }} | ||
# Token for current repo (used to post PR comment) | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
# Upload artifacts to specific branch, usually the main branch is | ||
# protected by rules so it's not possible to upload there | ||
artifacts-branch: prartifacts | ||
artifacts: | | ||
app/build/outputs/apk/debug/app-debug.apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters