From cd7d82d3783aac7f5da54de86179f18fe2a32648 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 2 Nov 2022 14:34:37 +0530 Subject: [PATCH] fix(release): rework Play Store release workflow --- .github/workflows/release.yml | 17 ++++++++++++++--- scripts/make-release.sh | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e35437ba..940ca949 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,15 +1,25 @@ name: Release to Google Play on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' + workflow_dispatch: jobs: publish-google-play-release: runs-on: ubuntu-latest steps: + + - name: Get latest release + id: latest-release + shell: bash + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + tag_name="$(gh api /repos/msfjarvis/compose-lobsters/releases --jq '.[0].tag_name')" + echo "checkout_ref=${tag_name}" >> $GITHUB_OUTPUT + - name: Checkout repository uses: actions/checkout@v3.1.0 + with: + ref: ${{ steps.latest-release.outputs.checkout_ref }} - name: Set up JDK uses: actions/setup-java@v3.6.0 @@ -35,6 +45,7 @@ jobs: packageName: dev.msfjarvis.claw.android releaseFiles: android/bundle/*.aab track: production + status: completed whatsNewDirectory: distribution/whatsnew mappingFile: android/bundle/mapping.txt diff --git a/scripts/make-release.sh b/scripts/make-release.sh index 916ba283..8c694157 100755 --- a/scripts/make-release.sh +++ b/scripts/make-release.sh @@ -21,3 +21,5 @@ git commit -am 'feat(release): start next development iteration' git push origin main "v${VERSION}" gh release create "v${VERSION}" -F distribution/whatsnew/whatsnew-en-GB --title "v${VERSION}" ./android/apk/*.apk ./android/bundle/*.aab + +gh workflow run release.yml