1
0
Fork 0
VendroidEnhanced/.github/workflows/release.yml

52 lines
1.5 KiB
YAML
Raw Normal View History

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
mkdir -p ~/.gradle
cat > ~/.gradle/gradle.properties << EOF
KEYSTORE_FILE=$HOME/keystore.jks
KEYSTORE_ALIAS=$KEYSTORE_ALIAS
KEYSTORE_PASSWORD=$KEYSTORE_PASSWORD
EOF
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
- name: Get some values needed for the release
id: release_values
run: |
echo "release_tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build
run: |
chmod +x ./gradlew
./gradlew app:assembleRelease
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:
TAG: ${{ env.release_tag }}