From 2eb7ea54bfc107d54eef2473d6d7d48e5374198a Mon Sep 17 00:00:00 2001 From: ignoramous Date: Fri, 1 Mar 2024 18:35:00 +0530 Subject: [PATCH] gh-action: release monthly builds --- .github/workflows/nightly.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a377533e9..139c5272f 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,9 +1,9 @@ -name: Weekly debug +name: Monthly debug on: workflow_dispatch: # to be able to run it manually schedule: - - cron: '53 21 9,18,27 * *' # on 12, 27 every month + - cron: '53 21 27 * *' # on 27 every month jobs: evaluateChanges: @@ -19,7 +19,7 @@ jobs: build: - name: Weeklies + name: Monthlies runs-on: ubuntu-latest needs: evaluateChanges if: needs.evaluateChanges.outputs.SHOULD_BUILD == 'true' @@ -42,10 +42,12 @@ jobs: - name: Build & notify if: env.TELEGRAM_CHAT_ID && env.SCHEDULED_BUILD_VARIANT && env.TELEGRAM_TOKEN run: | + # for now, support just one build variant for TASK in $SCHEDULED_BUILD_VARIANT; do ./gradlew $TASK - apk_path="$(find . -type f -iname *.apk)" + apk_path="$(find . -type f -iname '*.apk' | head -n1)" echo $apk_path + echo "APKFILE=${apk_path}" >> $GITHUB_ENV curl https://api.telegram.org/bot$TELEGRAM_TOKEN/sendDocument \ -F chat_id="$TELEGRAM_CHAT_ID" \ -F "caption=Size: $(ls -l --block-size=K "$apk_path" | awk '{ print $5 }')" \ @@ -59,5 +61,14 @@ jobs: if: success() with: name: rdns-${{ github.sha }} - path: app-*.apk + path: ${{ env.APKFILE }} if-no-files-found: error + + # github.com/softprops/action-gh-release + - name: Release + uses: softprops/action-gh-release@v1 + with: + prerelease: true + files: | + ${{ env. APKFILE }} +