Skip to content

Commit 2eb7ea5

Browse files
authored
gh-action: release monthly builds
1 parent 75a3cf8 commit 2eb7ea5

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

.github/workflows/nightly.yml

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Weekly debug
1+
name: Monthly debug
22

33
on:
44
workflow_dispatch: # to be able to run it manually
55
schedule:
6-
- cron: '53 21 9,18,27 * *' # on 12, 27 every month
6+
- cron: '53 21 27 * *' # on 27 every month
77

88
jobs:
99
evaluateChanges:
@@ -19,7 +19,7 @@ jobs:
1919
2020
2121
build:
22-
name: Weeklies
22+
name: Monthlies
2323
runs-on: ubuntu-latest
2424
needs: evaluateChanges
2525
if: needs.evaluateChanges.outputs.SHOULD_BUILD == 'true'
@@ -42,10 +42,12 @@ jobs:
4242
- name: Build & notify
4343
if: env.TELEGRAM_CHAT_ID && env.SCHEDULED_BUILD_VARIANT && env.TELEGRAM_TOKEN
4444
run: |
45+
# for now, support just one build variant
4546
for TASK in $SCHEDULED_BUILD_VARIANT; do
4647
./gradlew $TASK
47-
apk_path="$(find . -type f -iname *.apk)"
48+
apk_path="$(find . -type f -iname '*.apk' | head -n1)"
4849
echo $apk_path
50+
echo "APKFILE=${apk_path}" >> $GITHUB_ENV
4951
curl https://api.telegram.org/bot$TELEGRAM_TOKEN/sendDocument \
5052
-F chat_id="$TELEGRAM_CHAT_ID" \
5153
-F "caption=Size: $(ls -l --block-size=K "$apk_path" | awk '{ print $5 }')" \
@@ -59,5 +61,14 @@ jobs:
5961
if: success()
6062
with:
6163
name: rdns-${{ github.sha }}
62-
path: app-*.apk
64+
path: ${{ env.APKFILE }}
6365
if-no-files-found: error
66+
67+
# github.com/softprops/action-gh-release
68+
- name: Release
69+
uses: softprops/action-gh-release@v1
70+
with:
71+
prerelease: true
72+
files: |
73+
${{ env. APKFILE }}
74+

0 commit comments

Comments
 (0)