File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 88jobs :
99 build :
1010 name : Build and Release Go Binaries
11- runs-on : ubuntu-24.04
11+ runs-on : ubuntu-latest
1212
1313 strategy :
1414 matrix :
1515 os : [linux]
1616 goarch : [amd64]
1717
1818 steps :
19+ # Step 1: Checkout the code
1920 - name : Checkout code
2021 uses : actions/checkout@v3
2122
23+ # Step 2: Set up Go
2224 - name : Set up Go
2325 uses : actions/setup-go@v4
2426 with :
2527 go-version : 1.23
2628
29+ # Step 3: Build the binary for the selected platform
2730 - name : Build Go Binary
2831 run : |
2932 mkdir -p dist
3033 GOOS=${{ matrix.os }} GOARCH=${{ matrix.goarch }} go build -o dist/my-binary-${{ matrix.os }}-${{ matrix.goarch }}
3134
35+ # Step 4: Extract Release Upload URL
3236 - name : Extract Release Upload URL
3337 id : get_release
3438 run : |
35- upload_url=$(jq -r '.release.upload_url' <<< "${{ github.event }}")
36- echo "upload_url=${upload_url%{*}}" >> $GITHUB_ENV
39+ echo "upload_url=${{ github.event.release.upload_url }}" >> $GITHUB_ENV
3740
41+ # Step 5: Upload binaries as release assets
3842 - name : Upload Release Assets
3943 run : |
4044 for file in dist/*; do
You can’t perform that action at this time.
0 commit comments