Skip to content

Commit 6597c4d

Browse files
author
mamengqiu
committed
fix: test init CICD
1 parent 6bc0c57 commit 6597c4d

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/.github-ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build Flutter APK
2+
3+
on:
4+
push:
5+
branches:
6+
- test
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout source
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Flutter
18+
uses: subosito/flutter-action@v2
19+
with:
20+
flutter-version: '3.13.0' # 可根据你的版本修改
21+
22+
- name: Install dependencies
23+
run: flutter pub get
24+
25+
- name: Analyze
26+
run: flutter analyze
27+
28+
- name: Run tests
29+
run: flutter test
30+
31+
- name: Build APK
32+
run: flutter build apk --release
33+
34+
- name: Upload APK artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: flutter-apk
38+
path: build/app/outputs/flutter-apk/app-release.apk

0 commit comments

Comments
 (0)