Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

feat: update purge rules #290

feat: update purge rules

feat: update purge rules #290

Workflow file for this run

name: Android CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
if: ${{ !startsWith(github.event.head_commit.message, '[skip ci]') }}
steps:
- name: Checkout
uses: actions/[email protected]
with:
submodules: 'recursive'
fetch-depth: 0
- name: Setup JDK 17
uses: actions/[email protected]
with:
java-version: 17
distribution: 'temurin'
- name: Build with Gradle
run: bash ./gradlew assembleRelease
- name: Sign Android release
if: success()
id: sign
uses: r0adkll/sign-android-release@v1
env:
BUILD_TOOLS_VERSION: "33.0.2"
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Retrieve filename
if: success()
run: echo "FILENAME=$(basename ${{ steps.sign.outputs.signedReleaseFile }})" >> $GITHUB_ENV
shell: bash
- name: Upload built apk
if: success()
id: upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.FILENAME }}
path: ${{ steps.sign.outputs.signedReleaseFile }}
- name: Write job summary
if: success()
run: echo "### [下载链接](${{ steps.upload.outputs.artifact-url }})" >> $GITHUB_STEP_SUMMARY
- name: Send commit to telegram
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: markdown
message: |+
New push to github!
*${{ github.event.head_commit.message }}* by ${{ github.event.head_commit.author.name }}
See commit detail [here](${{ github.event.head_commit.url }})
Snapshot apk is attached
document: ${{ github.workspace }}/${{ steps.sign.outputs.signedReleaseFile }}
skipped:
runs-on: ubuntu-latest
if: ${{ startsWith(github.event.head_commit.message, '[skip ci]') }}
steps:
- name: Send commit to telegram
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: markdown
message: |+
New push to github!
*${{ github.event.head_commit.message }}* by ${{ github.event.head_commit.author.name }}
See commit detail [here](${{ github.event.head_commit.url }})
This push skipped building