Skip to content

Commit

Permalink
修改安卓自动打包脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
molihuan committed May 14, 2024
1 parent a14e0f7 commit d710ada
Showing 1 changed file with 36 additions and 19 deletions.
55 changes: 36 additions & 19 deletions .github/workflows/release_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,51 @@ on:
jobs:
build:
name: Build
runs-on: windows-latest
runs-on: ubuntu-20.04
steps:
# 使用本项目
- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4

# 设置jdk
- uses: actions/[email protected]
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: 'zulu'
# The Java version to set up. Takes a whole or semver Java version. See examples of supported syntax in README file
java-version: 17
#设置flutter
- uses: subosito/[email protected]

# 设置flutter
- name: Set up Flutter
uses: subosito/[email protected]
with:
# The Flutter version to make available on the path
flutter-version: 3.19.3
# The Flutter build release channel
channel: # optional, default is stable

# Get flutter dependencies.
- run: flutter pub get
# Build apk.打包各架构版本
- run: flutter build apk --split-per-abi
# Upload generated apk to the artifacts.
- uses: actions/upload-artifact@v4
# 获取flutter依赖
- name: Get Flutter dependencies
run: flutter pub get

# 构建apk
- name: Build APK
run: flutter build apk --split-per-abi

- name: Upload Artifact x86_64-release.apk
uses: actions/upload-artifact@v4
with:
name: app-x86_64-release.zip
path: build/app/outputs/flutter-apk/app-x86_64-release.apk

- name: Upload Artifact armeabi-v7a-release.apk
uses: actions/upload-artifact@v4
with:
name: app-armeabi-v7a-release.zip
path: build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk

- name: Upload Artifact arm64-v8a-release.apk
uses: actions/upload-artifact@v4
with:
# Artifact name
name: release-android.zip
# 导出文件夹
path: build/app/outputs/flutter-apk/
# The desired behavior if no files are found using the provided path.
name: app-arm64-v8a-release.zip
path: build/app/outputs/flutter-apk/app-arm64-v8a-release.apk



0 comments on commit d710ada

Please sign in to comment.