ci: fix #11
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
name: 构建 Android 应用 | |
on: | |
push: | |
tags: | |
- 'v*' | |
# workflow_dispatch: | |
# inputs: | |
# tag: | |
# description: 'Version tag' | |
# required: true | |
# default: 'v0.0.1' | |
jobs: | |
main: | |
name: Release Android App | |
runs-on: ubuntu-latest | |
steps: | |
- name: 克隆仓库 | |
uses: actions/checkout@v4 | |
- name: 设置 Java 环境 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: 17 | |
- name: 将screct变量添加签名文件 | |
run: | | |
echo ${{ secrets.KEYSTORE_BASE64 }} | base64 --decode > ./android/app/bbmusic-keystore.jks | |
echo ${{ secrets.KEY_PROPERTIES }} > ./android/key.properties | |
ll -a ./android/app | |
cat ./android/key.properties | |
- name: 安装 Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: 3.22.2 | |
channel: stable | |
cache: true | |
- run: flutter build apk --split-per-abi | |
- run: flutter build apk | |
- name: 推送到 release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: ./build/app/outputs/flutter-apk/* | |
token: ${{ secrets.GITHUB_TOKEN }} |