ci: build pull requests #111
Workflow file for this run
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
name: Build pull request | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/pr-build.yml" | |
- "app/**" | |
- "gradle/**" | |
- "build.graddle.kts" | |
- "gradle.properties" | |
- "settings.gradle.kts" | |
jobs: | |
build-debug: | |
name: Build Debug | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# Make sure the release step uses its own credentials: | |
# https://github.com/cycjimmy/semantic-release-action#private-packages | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Build with Gradle | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew assembleDebug --no-daemon | |
- name: Sign APK | |
id: sign_apk | |
uses: ilharp/sign-android-release@v1 | |
with: | |
releaseDir: app/build/outputs/apk/debug | |
signingKey: ${{ secrets.SIGNING_KEYSTORE }} | |
keyStorePassword: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }} | |
keyAlias: ${{ secrets.SIGNING_KEY_ALIAS }} | |
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
- name: Upload build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: revanced-manager-debug | |
path: ${{ steps.sign_apk.outputs.signedFile }} | |
build-release: | |
name: Build Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# Make sure the release step uses its own credentials: | |
# https://github.com/cycjimmy/semantic-release-action#private-packages | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Build with Gradle | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew assembleRelease --no-daemon | |
- name: Sign APK | |
id: sign_apk | |
uses: ilharp/sign-android-release@v1 | |
with: | |
releaseDir: app/build/outputs/apk/release | |
signingKey: ${{ secrets.SIGNING_KEYSTORE }} | |
keyStorePassword: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }} | |
keyAlias: ${{ secrets.SIGNING_KEY_ALIAS }} | |
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
- name: Upload build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: revanced-manager | |
path: ${{ steps.sign_apk.outputs.signedFile }} |