From 23ce6c0763a5591fa1c4a8e34922f6ae6d2be8bb Mon Sep 17 00:00:00 2001 From: Timmy Braun <35117769+timbze@users.noreply.github.com> Date: Sat, 23 Oct 2021 10:06:35 -0600 Subject: [PATCH] Simplify Github release CI code --- .github/workflows/build-apk.yml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-apk.yml b/.github/workflows/build-apk.yml index 27e40f886f..ec035844cd 100644 --- a/.github/workflows/build-apk.yml +++ b/.github/workflows/build-apk.yml @@ -81,33 +81,19 @@ jobs: echo ${{ secrets.KEYSTORE_BASE64 }} | base64 --decode > keystore.jks $ANDROID_HOME/build-tools/29.0.3/apksigner sign --ks keystore.jks --ks-pass 'pass:${{ secrets.KEYSTORE_PASSPHRASE }}' --key-pass 'pass:${{ secrets.KEY_PASSPHRASE }}' --out $GITHUB_WORKSPACE/andbible-$TAG_NAME.apk app-github-release-unsigned.apk rm -f keystore.jks + - name: Create release if: contains(github.ref, 'refs/tags/') - id: create_release - uses: actions/create-release@v1 + uses: softprops/action-gh-release@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAG_NAME: ${{ steps.tag_name.outputs.TAG }} - VERSION_NAME: ${{ steps.tag_name.outputs.VERSION_NAME }} RELEASE_TITLE: ${{ steps.tag_name.outputs.RELEASE_TITLE }} with: - tag_name: ${{ env.TAG_NAME }} - release_name: ${{ env.RELEASE_TITLE }} + name: ${{ env.RELEASE_TITLE }} body_path: ./RELEASENOTES.txt + files: ./andbible-${{ env.TAG_NAME }}.apk prerelease: true - - name: Upload Release Apk - if: contains(github.ref, 'refs/tags/') - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAG_NAME: ${{ steps.tag_name.outputs.TAG }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./andbible-${{ env.TAG_NAME }}.apk - asset_name: andbible-${{ env.TAG_NAME }}.apk - asset_content_type: application/vnd.android.package-archive - - name: Before saving cache run: | rm -f $HOME/.gradle/caches/modules-2/modules-2.lock