mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-13 02:14:31 +01:00
a17a05995a
Allow for automatic capture of buildscan in job summary, and smarter caching than the one provided by `setup-java`.
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: Build pull request
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/pr-build.yml"
|
|
- "app/**"
|
|
- "gradle/**"
|
|
- "*.properties"
|
|
- ".kts"
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
- name: Build with Gradle
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: ./gradlew assembleRelease --no-daemon -PnoProguard -PsignAsDebug
|
|
|
|
- name: Set env
|
|
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
|
|
|
- name: Add hash to APK
|
|
run: mv app/build/outputs/apk/release/app-release.apk revanced-manager-${{ env.COMMIT_HASH }}.apk
|
|
|
|
- name: Upload build
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: revanced-manager
|
|
path: revanced-manager-${{ env.COMMIT_HASH }}.apk
|