Skip to content

Commit ba8a802

Browse files
authored
Update release.yaml
1 parent 94aeb08 commit ba8a802

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/release.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release Auparse
22
on:
33
push:
44
tags:
5-
- 'v*' # Runs only when a new tag is pushed (e.g., v2.6.1, v3.0.0)
5+
- 'v*' # Runs only on new tag push
66

77
permissions:
88
contents: write
@@ -16,12 +16,12 @@ jobs:
1616
os: [ linux, darwin ]
1717
arch: [ amd64, arm64 ]
1818
env:
19-
tag: ${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}
19+
tag: v${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}
2020
steps:
2121
- name: Checkout code
2222
uses: actions/checkout@v4
2323
with:
24-
fetch-depth: 0 # Fetch all tags
24+
fetch-depth: 0 # Ensure all tags are fetched
2525

2626
- name: Set up Go
2727
uses: actions/setup-go@v5
@@ -30,13 +30,13 @@ jobs:
3030

3131
- name: Build
3232
run: |
33-
GOOS="${{ matrix.os }}" GOARCH="${{ matrix.arch }}" go build -o bin/auparse-${{ env.tag }} cmd/auparse/auparse.go
33+
GOOS="${{ matrix.os }}" GOARCH="${{ matrix.arch }}" go build -o bin/auparse-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }} cmd/auparse/auparse.go
3434
3535
- name: Upload Artifact
3636
uses: actions/upload-artifact@v4
3737
with:
38-
name: auparse-${{ env.tag }}
39-
path: bin/auparse-${{ env.tag }}
38+
name: auparse-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}
39+
path: bin/auparse-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}
4040

4141
release:
4242
name: Release
@@ -53,11 +53,15 @@ jobs:
5353
uses: actions/download-artifact@v4
5454
with:
5555
path: bin
56+
merge-multiple: true # Merge all artifacts in one folder
57+
58+
- name: List downloaded files
59+
run: ls -R bin # Debugging step to verify files
5660

5761
- name: Release
5862
uses: softprops/action-gh-release@v2
5963
with:
60-
files: bin/auparse-*
64+
files: bin/*
6165
name: 'Release ${{ github.ref_name }}'
6266
tag_name: '${{ github.ref_name }}'
6367
generate_release_notes: true

0 commit comments

Comments
 (0)