Skip to content

Commit

Permalink
gh-action: release monthly builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous authored Mar 1, 2024
1 parent 75a3cf8 commit 2eb7ea5
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -19,7 +19,7 @@ jobs:
build:
name: Weeklies
name: Monthlies
runs-on: ubuntu-latest
needs: evaluateChanges
if: needs.evaluateChanges.outputs.SHOULD_BUILD == 'true'
Expand All @@ -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 }')" \
Expand All @@ -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 }}

0 comments on commit 2eb7ea5

Please sign in to comment.