1- name : Build Go Engine & Create Release Assets
1+ name : Manual Release Creator
22
33on :
44 workflow_dispatch :
5- push :
6- tags :
7- - ' v*.*.*'
5+ inputs :
6+ tag_name :
7+ description : ' The tag name for the release (e.g., v0.1.0-test)'
8+ required : true
9+ default : ' v0.1.0-alpha'
10+
811jobs :
912 build-and-release :
1013 strategy :
@@ -26,57 +29,43 @@ jobs:
2629 goos : darwin
2730 goarch : arm64
2831 arch_name : " arm64-v8a"
29-
3032 runs-on : ${{ matrix.os }}
3133 steps :
32- - name : Checkout repository
33- uses : actions/checkout@v4
34-
35- - name : Set up Go
36- uses : actions/setup-go@v5
34+ - uses : actions/checkout@v4
35+ - uses : actions/setup-go@v5
3736 with :
3837 go-version : ' 1.22'
39-
4038 - name : Install Zip tool (for Windows only)
4139 if : runner.os == 'Windows'
4240 run : choco install zip
43-
4441 - name : Install Dependencies
4542 run : go mod tidy
4643 working-directory : ./core_engine
47-
4844 - name : Set output names
4945 id : set_names
5046 shell : bash
5147 run : |
5248 EXE_NAME="core_engine"
53- if [ "${{ matrix.goos }}" == "windows" ]; then
54- EXE_NAME="core_engine.exe"
55- fi
49+ if [ "${{ matrix.goos }}" == "windows" ]; then EXE_NAME="core_engine.exe"; fi
5650 echo "EXE_NAME=$EXE_NAME" >> $GITHUB_ENV
5751 echo "ZIP_NAME=core_engine-${{ matrix.goos }}-${{ matrix.arch_name }}.zip" >> $GITHUB_ENV
58-
5952 - name : Build Go Executable
6053 env :
6154 GOOS : ${{ matrix.goos }}
6255 GOARCH : ${{ matrix.goarch }}
6356 run : go build -v -o ${{ env.EXE_NAME }} main.go
6457 working-directory : ./core_engine
65-
6658 - name : Create Zip Archive
6759 shell : bash
6860 run : |
6961 cd core_engine
7062 zip ${{ env.ZIP_NAME }} ${{ env.EXE_NAME }}
71- cd ..
72-
73- - name : Upload Artifact for Release
63+ - name : Upload Artifact for the Release job
7464 uses : actions/upload-artifact@v4
7565 with :
76- name : ${{ env.ZIP_NAME }}
66+ name : release-asset- ${{ matrix.goos }}-${{ matrix.arch_name }}
7767 path : core_engine/${{ env.ZIP_NAME }}
7868
79-
8069 create-release :
8170 needs : build-and-release
8271 runs-on : ubuntu-latest
8574 uses : actions/download-artifact@v4
8675 with :
8776 path : artifacts
88-
8977 - name : Create Release and Upload Assets
9078 uses : softprops/action-gh-release@v2
9179 with :
92- tag_name : ${{ github.ref }}
80+ tag_name : ${{ github.event.inputs.tag_name }}
9381 files : artifacts/**/*.zip
0 commit comments