From ca1bd684e9598d21657ad444c393dfc61ddaebac Mon Sep 17 00:00:00 2001 From: Patrick Helm Date: Sun, 2 Oct 2022 17:11:06 +0200 Subject: [PATCH] release app on github the release can be further customized with the provided actions References #43 --- .github/workflows/android.yml | 8 +++++--- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index e13abaa..f690ffd 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -5,13 +5,15 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: 11 + distribution: 'temurin' + cache: 'gradle'' - name: Build with Gradle run: ./gradlew build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5be034b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: 'temurin' + cache: 'gradle' + - name: Build with Gradle + run: ./gradlew buildRelease + - name: Sign app + uses: ilharp/sign-android-release@v1 + id: sign_app + with: + keyAlias: ${{ secrets.ANDROID_KEY_ALIAS }} + keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} + keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} + signingKey: ${{ secrets.ANDROID_SIGNING_KEY }} + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + files: ${{steps.sign_app.outputs.signedFile}}