Skip to content

Android CI

Android CI #35

Workflow file for this run

name: Android CI
on:
push:
branches: [ "main" ]
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Get random number
id: random
run: echo "NUMBER=$(shuf -i 1-10000 -n 1)" >> $GITHUB_OUTPUT
- name: Build Release
run: ./gradlew assembleUniversalRelease -PPACKAGE_NAME_SEED=${{ steps.random.outputs.NUMBER }}
- name: Upload a Release Artifact
uses: actions/upload-artifact@v4
with:
name: rvxp-ci-release-apk
path: |
app/build/outputs/apk/universal/release
app/build/outputs/mapping/universalRelease/mapping.txt
- name: Create AutoBuild Release
run: |
GIT_DESCRIBE=$(git rev-parse --short HEAD)
GIT_COMMIT_DATE=$(git log -1 --format=%cd --date=format:%y%m%d)
cd app/build/outputs/apk/universal/release/
mv app-universal-release.apk ReVancedXposedSpotify-${GIT_COMMIT_DATE}.apk
gh release delete autobuild --yes || true
gh release create autobuild ReVancedXposedSpotify-${GIT_COMMIT_DATE}.apk --latest --title "Build ${GIT_COMMIT_DATE}" --notes "Commit ${GIT_DESCRIBE}. The package name and signature of this build are different every day. You don't have to reinstall it every day."
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}