diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8790495..c420103 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,17 +10,20 @@ jobs: buildRelease: name: Build an release runs-on: ubuntu-latest + environment: Release if: startsWith(github.ref, 'refs/tags/') steps: - uses: actions/checkout@v4 - - name: Setup JAVA 17 uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: 17 + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + - name: Cache Gradle and wrapper uses: actions/cache@v2 with: @@ -32,15 +35,11 @@ jobs: - name: Decode Keystore env: ENCODED_STRING: ${{ secrets.SIGNING_KEY_STORE_BASE64 }} - SIGNING_KEY_STORE_PATH: ${{ secrets.SIGNING_KEY_STORE_PATH }} - run: | - echo $ENCODED_STRING > keystore-b64.txt - base64 -d keystore-b64.txt > $env:SIGNING_KEY_STORE_PATH - + echo $ENCODED_STRING | base64 --decode > app/keystore.jks - name: Build Release apk env: - SIGNING_KEY_STORE_PATH: ${{ secrets.SIGNING_KEY_STORE_PATH }} + SIGNING_KEY_STORE_PATH: app/keystore.jks SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} @@ -52,7 +51,6 @@ jobs: name: release-artifacts path: app/build/outputs/apk/release/ - - name: Create Github Pre Release Release if: ${{ endsWith(github.ref_name, 'beta') }} uses: softprops/action-gh-release@v1 @@ -61,7 +59,6 @@ jobs: prerelease: true files: | app/build/outputs/apk/release/app-release.apk - - name: Create Github Release Release if: ${{ !endsWith(github.ref_name, 'beta') }} uses: softprops/action-gh-release@v1 diff --git a/app/build.gradle.kts b/app/build.gradle.kts index a028cf2..53764fb 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -60,6 +60,8 @@ android { getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) + + signingConfig = signingConfigs["release"] } create("customDebugType") {