From 8268243581305aeb81b623f6f31a64d97c192abd Mon Sep 17 00:00:00 2001 From: TheRolf Date: Fri, 26 Feb 2021 18:56:08 +0100 Subject: [PATCH 1/2] Update android.yml --- .github/workflows/android.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 9a738cb..0826a69 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -30,13 +30,16 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} restore-keys: | ${{ runner.os }}-gradle- + - name: 'Get Previous tag' + id: previoustag + uses: "WyriHaximus/github-action-get-previous-tag@v1" - name: Assemble Debug run: ./gradlew assembleDebug - name: Upload APK uses: actions/upload-artifact@v2 with: - name: OptymoNext_${{ github.event.inputs.version || github.ref }} + name: OptymoNext_${{ github.event.inputs.version || steps.previoustag.outputs.tag }} path: app/build/outputs/apk/debug/**.apk - name: Create Release id: create_release @@ -44,8 +47,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.event.inputs.version || github.ref }} - release_name: ${{ github.event.inputs.version || github.ref }} + tag_name: ${{ github.event.inputs.version || steps.previoustag.outputs.tag }} + release_name: ${{ github.event.inputs.version || steps.previoustag.outputs.tag }} draft: false prerelease: false - name: Upload Release Asset @@ -56,5 +59,5 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: app/build/outputs/apk/debug/app-debug.apk - asset_name: OptymoNext_${{ github.event.inputs.version || github.ref }}.apk - asset_content_type: application/vnd.android.package-archive \ No newline at end of file + asset_name: OptymoNext_${{ github.event.inputs.version || steps.previoustag.outputs.tag }}.apk + asset_content_type: application/vnd.android.package-archive From d88cb75396ee655ee458c471ee7e7586de248415 Mon Sep 17 00:00:00 2001 From: TheRolf Date: Fri, 26 Feb 2021 19:06:56 +0100 Subject: [PATCH 2/2] Update android.yml --- .github/workflows/android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 0826a69..97937da 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -19,8 +19,8 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 - + uses: actions/checkout@v2.3.3 + - run: git fetch --prune --unshallow - name: Restore Cache uses: actions/cache@v2 with: