github actions

This commit is contained in:
v7lin
2022-05-25 10:25:49 +08:00
parent 2b57525871
commit 9c3760b067
4 changed files with 35 additions and 5 deletions

View File

@ -3,8 +3,8 @@ name: build
on: [push, pull_request]
jobs:
build_android:
name: Build Android on ${{ matrix.os }}
build_android_debug:
name: Build Android Debug on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
@ -27,3 +27,30 @@ jobs:
- run: flutter pub publish --dry-run
- run: flutter analyze lib example/lib
- run: cd example; flutter build apk --debug
build_android_release:
name: Build Android Release on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Run ${{ github.repository_owner }}/install-ndk@shell
run: |
sudo echo "y" | sudo $ANDROID_HOME/tools/bin/sdkmanager "ndk;21.1.6352462"
- run: flutter --version
- run: flutter pub get
- run: flutter format --dry-run --set-exit-if-changed .
- run: flutter pub publish --dry-run
- run: flutter analyze lib example/lib
- run: cd example; flutter build apk
- run: ls example/build/app/outputs/apk/walle/channels/
- run: ls example/build/app/outputs/apk/walle/channels/market/

View File

@ -30,7 +30,7 @@ flutter版walle多渠道打包工具
```groovy
// android/app/build.gradle
apply from: "${rootProject.findProject(":walle_kit").projectDir}/walle_kit.gradle"
apply from: "${project(":walle_kit").projectDir}/walle_kit.gradle"
```
* fileNameFormat

View File

@ -11,3 +11,6 @@ GeneratedPluginRegistrant.java
key.properties
**/*.keystore
**/*.jks
#
app/script/

View File

@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
// walle
apply from: "${rootProject.findProject(":walle_kit").projectDir}/walle_kit.gradle"
apply from: "${project(":walle_kit").projectDir}/walle_kit.gradle"
android {
compileSdkVersion flutter.compileSdkVersion
@ -57,7 +57,7 @@ android {
walleConfigs {
release {
enabled = org.gradle.internal.os.OperatingSystem.current().isMacOsX()
enabled = true
// // https://github.com/v7lin/walle-docker
// jarFile = file('script/walle-cli-all.jar') // 默认file('script/walle-cli-all.jar')