This repository has been archived by the owner on Sep 15, 2024. It is now read-only.
feat: message page always open with notification tab #232
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
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/checkout@v3 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Retrieve version | |
run: | | |
echo VERSION=$(echo ${{ github.event.head_commit.id }} | head -c 10) >> $GITHUB_ENV | |
- name: Build with Gradle | |
run: bash ./gradlew -PappVerName=${{ env.VERSION }} 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: Upload built apk | |
if: success() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: TS_${{ env.VERSION }}.apk | |
path: ${{ steps.sign.outputs.signedReleaseFile }} | |
- 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: | |
- uses: actions/checkout@v2 | |
- 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 |