Update v2.0.0 #249
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- 'master' | |
env: | |
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }} | |
ALIAS: ${{ secrets.ALIAS }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
jobs: | |
build: | |
name: Build APK | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: oracle | |
cache: 'gradle' | |
- name: Checkout keystore repository | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ secrets.KEYSTORE_GIT_REPOSITORY }} | |
token: ${{ secrets.KEYSTORE_ACCESS_TOKEN }} | |
path: app/keystore | |
- name: Build APK | |
run: bash ./gradlew assembleRelease --stacktrace --no-daemon | |
- name: Upload signed APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logfox.apk | |
compression-level: 0 | |
path: app/build/outputs/apk/release/app-release.apk | |
- name: Move APK | |
run: bash mv app/build/outputs/apk/release/app-release.apk . | |
- uses: actions/cache/save@v4 | |
with: | |
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 | |
- uses: actions/cache/restore@v4 | |
with: | |
path: app-release.apk | |
key: cache-${{ 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 }}` |