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`.
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
name: Release Build
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set env
|
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
|
|
- 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
|
|
with:
|
|
cache-disabled: true
|
|
|
|
- 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: Add version to APK
|
|
run: mv ${{ steps.sign_apk.outputs.signedFile }} revanced-manager-${{ env.RELEASE_VERSION }}.apk
|
|
|
|
- name: Publish release APK
|
|
uses: "marvinpinto/action-automatic-releases@latest"
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
prerelease: false
|
|
files: revanced-manager-${{ env.RELEASE_VERSION }}.apk
|