@@ -3,7 +3,7 @@ name: Build and Release
33on :
44 pull_request :
55 branches :
6- - test
6+ - main
77 types :
88 - closed
99
@@ -23,18 +23,16 @@ jobs:
2323 with :
2424 release_name : ${{ github.event.pull_request.title }} # pull request title
2525 body : ${{ github.event.pull_request.body }}
26- tag_name : ${{ steps.create_short_sha.outputs.sha_short }}
26+ tag_name : ${{ github.event.pull_request.title }}
2727 env :
2828 GITHUB_TOKEN : ${{ github.token }}
29-
30- - id : step_version
31- run : echo "::set-output name=version::${{ steps.package_version.outputs.version }}"
29+
30+
3231 - id : step_upload_url
3332 run : echo "::set-output name=upload_url::${{ steps.create_release.outputs.upload_url }}"
3433 outputs :
35- version : ${{ steps.step_version.outputs.version }}
3634 upload_url : ${{ steps.step_upload_url.outputs.upload_url }}
37-
35+ sha_short : ${{ steps.create_short_sha.outputs.sha_short }}
3836
3937 build-android :
4038 name : Build android and upload
6159 GITHUB_TOKEN : ${{ github.token }}
6260 with :
6361 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
6664 asset_content_type : application/gzip
6765 build-windows :
6866 name : Build windows and upload
7977 run : flutter config --enable-windows-desktop
8078 - name : Build windows
8179 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