Skip to content

Commit afa1257

Browse files
committed
Change workflow again
1 parent 4af23d6 commit afa1257

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,37 @@ on:
88
jobs:
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

0 commit comments

Comments
 (0)