diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 422d4242..24c4ca83 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,11 +17,19 @@ jobs: distribution: "zulu" cache: gradle + - name: Decode Keystore + id: decode_keystore + if: ${{ github.event_name != 'pull_request' || github.ref_type == 'tag' }} + uses: timheuer/base64-to-file@v1.2 + with: + fileName: ${{ vars.RELEASE_KEYSTORE }} + fileDir: ${{ github.workspace }} + encodedString: ${{ secrets.KEYSTORE }} + - name: Generate keystore.properties if: ${{ github.event_name != 'pull_request' || github.ref_type == 'tag' }} run: | if [ -n "${{ secrets.RELEASEKEYPASSWORD }}" ]; then - echo ${{ secrets.KEYSTORE }} | base64 --decode > ${{ vars.RELEASE_KEYSTORE }} echo keystore.file="${{ vars.RELEASE_KEYSTORE }}" >> keystore.properties echo keystore.password="${{ secrets.RELEASESTOREPASSWORD }}" >> keystore.properties echo keystore.key.alias="${{ vars.RELEASE_KEY_ALIAS }}" >> keystore.properties