ci: init ci

This commit is contained in:
13574
2023-09-08 11:10:51 +08:00
parent b23d1a193f
commit 21764d2653

49
.github/workflows/android_ci.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
name: Android CI
on:
push:
branches:
- *
pull_request:
branches:
- *
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYYMMDD-HH
utcOffset: "+08:00"
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
name: Install dart depenedncies
run: flutter pub get
- name: Decode Keystore
env:
ENCODED_STRING: ${{ secrets.SIGNING_STORE_BASE64 }}
run: echo $ENCODED_STRING | base64 -di > app/keystore.jks
- name: Build apk
run: flutter build android release
env:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: Upload artifact
with:
name: app-release.${{ steps.current-time.outputs.formattedTime }}
path: android/app/release/*.apk