-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
||
|