@@ -3,7 +3,7 @@ name: Build and Release
3
3
on :
4
4
pull_request :
5
5
branches :
6
- - test
6
+ - main
7
7
types :
8
8
- closed
9
9
@@ -23,18 +23,16 @@ jobs:
23
23
with :
24
24
release_name : ${{ github.event.pull_request.title }} # pull request title
25
25
body : ${{ github.event.pull_request.body }}
26
- tag_name : ${{ steps.create_short_sha.outputs.sha_short }}
26
+ tag_name : ${{ github.event.pull_request.title }}
27
27
env :
28
28
GITHUB_TOKEN : ${{ github.token }}
29
-
30
- - id : step_version
31
- run : echo "::set-output name=version::${{ steps.package_version.outputs.version }}"
29
+
30
+
32
31
- id : step_upload_url
33
32
run : echo "::set-output name=upload_url::${{ steps.create_release.outputs.upload_url }}"
34
33
outputs :
35
- version : ${{ steps.step_version.outputs.version }}
36
34
upload_url : ${{ steps.step_upload_url.outputs.upload_url }}
37
-
35
+ sha_short : ${{ steps.create_short_sha.outputs.sha_short }}
38
36
39
37
build-android :
40
38
name : Build android and upload
61
59
GITHUB_TOKEN : ${{ github.token }}
62
60
with :
63
61
upload_url : ${{ needs.create-release.outputs.upload_url }}
64
- asset_path : ${{ env.GITHUB_WORKSPACE }}/build/app/outputs/flutter-apk/app-release.apk
65
- asset_name : corecoder_develop_${{ needs.jobs.create-release.outputs.sha_short }} .apk
62
+ asset_path : ${{ github.workspace }}/build/app/outputs/flutter-apk/app-release.apk
63
+ asset_name : corecoder_develop_android .apk
66
64
asset_content_type : application/gzip
67
65
build-windows :
68
66
name : Build windows and upload
79
77
run : flutter config --enable-windows-desktop
80
78
- name : Build windows
81
79
run : flutter build windows
82
- # TODO: upload windows i dont know windows file path help
80
+ - name : Zip windows build
81
+ run : powershell Compress-Archive -DestinationPath ${{ github.workspace }}/windows_build.zip -Path ${{ github.workspace }}/build/windows/runner/Release/*
82
+ - name : Upload windows build to release
83
+ uses : actions/upload-release-asset@v1
84
+ env :
85
+ GITHUB_TOKEN : ${{ github.token }}
86
+ with :
87
+ upload_url : ${{ needs.create-release.outputs.upload_url }}
88
+ asset_path : ${{ github.workspace }}/windows_build.zip
89
+ asset_name : corecoder_develop_windows.zip
90
+ asset_content_type : application/gzip
0 commit comments