Skip to content

Commit b42b1bb

Browse files
committed
fix
1 parent 89b313a commit b42b1bb

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,38 @@ jobs:
2727
contents: write
2828
discussions: write
2929
steps:
30+
# 拉取项目代码
31+
- uses: actions/checkout@v3
32+
# 建立 java 环境
33+
- name: Setup Java JDK
34+
uses: actions/setup-java@v3
35+
with:
36+
distribution: 'zulu'
37+
java-version: '11'
38+
# 建立 Flutter 环境
39+
- name: Flutter action
40+
uses: subosito/flutter-action@main
41+
with:
42+
channel: "stable"
43+
# 下载项目依赖
44+
- run: flutter pub get
45+
# 执行测试
46+
- run: flutter test
47+
# 打包 APK
48+
- name: Release apk
49+
run: flutter build apk --release
50+
working-directory: example
51+
# 发布到 上次文件至artifact
52+
- name: Upload APK
53+
uses: actions/upload-artifact@v3
54+
with:
55+
name: ${{ github.event.release.tag_name }}-app-release.apk
56+
path: example/build/app/outputs/apk/release/app-release.apk
3057
# 创建 Release
3158
- name: Create a Release
3259
uses: ncipollo/release-action@v1
3360
with:
61+
artifacts: "example/build/app/outputs/apk/release/*.apk"
3462
token: ${{ secrets.ACCOUNT_TOKEN }}
3563
allowUpdates: true
3664
artifactErrorsFailBuild: true

.idea/workspace.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)