Post manager builds to channel

This commit is contained in:
tehcneko 2021-01-28 23:17:32 +08:00
parent 5e01d341ee
commit fd099b605e
1 changed files with 8 additions and 0 deletions

View File

@ -48,3 +48,11 @@ jobs:
with: with:
name: manager-unsigned name: manager-unsigned
path: "app/build/outputs/apk/release/*.apk" path: "app/build/outputs/apk/release/*.apk"
- name: Post to channel
if: ${{ github.event_name != 'pull_request' && success() }}
env:
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
FILE: ${{ steps.sign.outputs.signedReleaseFile }}
run: |
curl https://api.telegram.org/bot${BOT_TOKEN}/sendDocument -X POST -F chat_id="$CHANNEL_ID" -F document="@$FILE"