Build ReVanced + ReVanced Music #61
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: ReVanced + ReVanced Music | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: zulu | |
- name: Download YouTube APK | |
uses: robinraju/release-downloader@v1.8 | |
with: | |
repository: '${{ github.repository }}' | |
tag: base | |
fileName: youtube.apk | |
token: '${{ secrets.GITHUB_TOKEN }}' | |
- name: Download YouTube Music APKs | |
uses: robinraju/release-downloader@v1.8 | |
with: | |
repository: '${{ github.repository }}' | |
tag: base | |
fileName: music*.apk | |
token: '${{ secrets.GITHUB_TOKEN }}' | |
- name: Build APKs | |
run: ./scripts/build.sh -mr | |
- name: Set current date as env variable | |
run: >- | |
echo "date_now=$(date +'%Y-%m-%d')" >> $GITHUB_ENV && echo | |
"date_now_nodashes=$(date +'%Y%m%d')" >> $GITHUB_ENV | |
- uses: kevin-david/zipalign-sign-android-release@v1.1.1 | |
name: Sign ReVanced APK | |
id: sign_yt | |
with: | |
releaseDirectory: build/yt/ | |
signingKeyBase64: '${{ secrets.SIGNING_KEY }}' | |
alias: '${{ secrets.ALIAS }}' | |
keyStorePassword: '${{ secrets.KEY_STORE_PASSWORD }}' | |
keyPassword: '${{ secrets.KEY_PASSWORD }}' | |
zipAlign: true | |
- uses: kevin-david/zipalign-sign-android-release@v1.1.1 | |
name: Sign ReVanced Music APKs | |
id: sign_ytm | |
with: | |
releaseDirectory: build/ytm/ | |
signingKeyBase64: '${{ secrets.SIGNING_KEY }}' | |
alias: '${{ secrets.ALIAS }}' | |
keyStorePassword: '${{ secrets.KEY_STORE_PASSWORD }}' | |
keyPassword: '${{ secrets.KEY_PASSWORD }}' | |
zipAlign: true | |
- name: Generate SHA256 checksums for the signed APK files | |
run: ./scripts/sha256gen.sh -mr | |
- uses: marvinpinto/action-automatic-releases@latest | |
name: Release ReVanced | |
with: | |
repo_token: '${{ secrets.GITHUB_TOKEN }}' | |
automatic_release_tag: '${{ env.date_now_nodashes }}-yt' | |
title: 'ReVanced ${{ env.date_now }}' | |
prerelease: false | |
files: | | |
build/hashes/sha256-yt.txt | |
${{ steps.sign_yt.outputs.signedReleaseFile }} | |
- uses: marvinpinto/action-automatic-releases@latest | |
name: Release ReVanced Music | |
with: | |
repo_token: '${{ secrets.GITHUB_TOKEN }}' | |
automatic_release_tag: '${{ env.date_now_nodashes }}-ytm' | |
title: 'ReVanced Music ${{ env.date_now }}' | |
prerelease: false | |
files: | | |
build/hashes/sha256-ytm.txt | |
${{ steps.sign_ytm.outputs.signedReleaseFile0 }} | |
${{ steps.sign_ytm.outputs.signedReleaseFile1 }} | |
${{ steps.sign_ytm.outputs.signedReleaseFile2 }} | |
${{ steps.sign_ytm.outputs.signedReleaseFile3 }} | |
- name: Get hashes | |
id: hashes | |
run: >- | |
echo "yt=$(cat build/hashes/sha256-yt.txt)" >> $GITHUB_OUTPUT && echo | |
"ytm=$(cat build/hashes/sha256-ytm.txt)" >> $GITHUB_OUTPUT | |
- name: Write ReVanced hash | |
uses: DamianReeves/write-file-action@master | |
with: | |
path: hashes/yt.txt | |
write-mode: overwrite | |
contents: | | |
${{ steps.hashes.outputs.yt }} | |
- name: Write ReVanced Music hash | |
uses: DamianReeves/write-file-action@master | |
with: | |
path: hashes/ytm.txt | |
write-mode: overwrite | |
contents: | | |
${{ steps.hashes.outputs.ytm }} | |
- name: Push updated hashes | |
uses: Andro999b/push@v1.3 | |
with: | |
github_token: '${{ secrets.GITHUB_TOKEN }}' | |
branch: main | |
force: false | |
message: 'revanced-repo: Update hashes' |