Skip to content

Commit

Permalink
[fix]: using cache to share apks
Browse files Browse the repository at this point in the history
  • Loading branch information
F0x1d committed Jul 6, 2024
1 parent 399e7c2 commit 5b6e97d
Showing 1 changed file with 31 additions and 21 deletions.
52 changes: 31 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,40 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: logfox.apk
compression-level: 0
path: app/build/outputs/apk/release/app-release.apk

send:
name: Send APK to Telegram
runs-on: ubuntu-latest
needs: build
steps:
- name: Get APK
uses: actions/download-artifact@v4
with:
name: logfox.apk
- name: Move APK
run: bash mv app/build/outputs/apk/release/app-release.apk .

- name: Send APK to Telegram
uses: appleboy/telegram-action@master
- uses: actions/cache/save@v4
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: markdown
document: logfox.apk
disable_web_page_preview: true
message: |
*${{ github.actor }}* committed to *${{ github.repository }}*
path: app-release.apk
key: cache-${{ github.sha }}

send:
name: Send APK
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4

Branch: *${{ github.ref_name }}*
Commit message: `${{ github.event.commits[0].message }}`
- uses: actions/cache/restore@v4
with:
path: app-release.apk
key: cache-${{ github.sha }}

[Changes](https://github.com/${{ github.repository }}/commit/${{github.sha}})
- name: Send APK to Telegram
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: markdown
document: app-release.apk
disable_web_page_preview: true
message: |
*${{ github.actor }}* committed to *${{ github.repository }}*
Branch: *${{ github.head_ref }}*
Commit message: `${{ github.event.head_commit.message }}`

0 comments on commit 5b6e97d

Please sign in to comment.