2022-12-13 19:41:40 -05:00
|
|
|
name: Release
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout builds
|
|
|
|
uses: actions/checkout@main
|
|
|
|
|
|
|
|
- name: Setup JDK 11
|
|
|
|
uses: actions/setup-java@main
|
|
|
|
with:
|
|
|
|
java-version: 11
|
2022-12-13 19:47:40 -05:00
|
|
|
distribution: adopt
|
2022-12-13 19:41:40 -05:00
|
|
|
|
|
|
|
- name: Setup Android SDK
|
|
|
|
uses: android-actions/setup-android@7c5672355aaa8fde5f97a91aa9a99616d1ace6bc # v2.0.10
|
|
|
|
|
|
|
|
- name: Setup credentials
|
|
|
|
run: |
|
|
|
|
base64 -d <<< "$KEYSTORE_BASE64" > $HOME/keystore.jks
|
|
|
|
env:
|
|
|
|
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
|
|
|
|
|
|
|
|
- name: Get some values needed for the release
|
|
|
|
id: release_values
|
|
|
|
run: |
|
|
|
|
echo "release_tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
|
|
|
|
2022-12-20 13:24:12 -05:00
|
|
|
- name: Build Release
|
2022-12-13 19:41:40 -05:00
|
|
|
run: |
|
|
|
|
chmod +x ./gradlew
|
2022-12-20 13:24:12 -05:00
|
|
|
./gradlew app:assembleRelease \
|
|
|
|
-Pandroid.injected.signing.store.file="$HOME/keystore.jks" \
|
|
|
|
-Pandroid.injected.signing.store.password="$KEYSTORE_PASSWORD" \
|
|
|
|
-Pandroid.injected.signing.key.alias="$KEY_ALIAS" \
|
|
|
|
-Pandroid.injected.signing.key.password="$KEY_PASSWORD"
|
|
|
|
|
2022-12-13 19:41:40 -05:00
|
|
|
mv app/build/outputs/apk/release/app-release.apk Vencord-$TAG.apk
|
|
|
|
gh release create $TAG --generate-notes --title "Vencord $TAG" Vencord-$TAG.apk
|
|
|
|
env:
|
2022-12-13 19:51:30 -05:00
|
|
|
TAG: ${{ env.release_tag }}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-12-20 13:24:12 -05:00
|
|
|
KEY_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}
|
|
|
|
KEY_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
|
|
|
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|