From a6cf0084a04534be06ca1059d915f6e596f30061 Mon Sep 17 00:00:00 2001 From: Ven Date: Tue, 20 Dec 2022 20:56:40 +0100 Subject: [PATCH] Add build artifacts --- .github/workflows/build-artifacts.yml | 49 +++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/build-artifacts.yml diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml new file mode 100644 index 0000000..8f5de14 --- /dev/null +++ b/.github/workflows/build-artifacts.yml @@ -0,0 +1,49 @@ +name: Release +on: + push: + pull_request: + branches: main + +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 + distribution: adopt + + - 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: Build Artifact + run: | + chmod +x ./gradlew + ./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" + + mv app/build/outputs/apk/release/app-release.apk + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + KEY_ALIAS: ${{ secrets.KEYSTORE_ALIAS }} + KEY_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + + - uses: actions/upload-artifact@main + with: + name: VencordDev + path: app/build/outputs/apk/release/app-release.apk