Add release workflow
This commit is contained in:
parent
e399b55877
commit
c4ed25bdba
1 changed files with 50 additions and 0 deletions
50
.github/workflows/release.yml
vendored
Normal file
50
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
- 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 }}
|
Loading…
Reference in a new issue