@@ -37,28 +37,35 @@ jobs:
3737
3838 - name : Build
3939 run : |
40- VERSION=$(echo "${GITHUB_REF#refs/tags/v}" )
41- GOARCH=${{ matrix.architecture }} GOOS=linux go \
42- build -ldflags="-s -w -X main.Version=${VERSION}" -v \
43- -o kman-${{ matrix.architecture }}-${VERSION} ./cmd/kman/
40+ GOARCH=${{ matrix.architecture }} GOOS=linux go build
41+ -ldflags="-s -w -X main.Version=${{ github.ref_name }}"
42+ -v -o kman-${{ matrix.architecture }}-${{ github.ref_name }} ./cmd/kman/
4443
4544 - name : Display structure of files
4645 run : ls -lRha
4746
4847 - name : Upload build artifacts
4948 uses : actions/upload-artifact@v4
5049 with :
51- name : kman-${{ matrix.architecture }}
52- path : kman-${{ matrix.architecture }}
50+ name : kman-${{ matrix.architecture }}-${{ github.ref_name }}
51+ path : kman-${{ matrix.architecture }}-${{ github.ref_name }}
52+
53+ release :
54+ runs-on : ubuntu-latest
55+ needs : build
56+ if : startsWith(github.ref, 'refs/tags/v')
57+
58+ steps :
59+ - name : Download all artifacts
60+ uses : actions/download-artifact@v4
61+ with :
62+ path : ./artifacts
63+
64+ - name : List downloaded files
65+ run : ls -lhR ./artifacts
5366
5467 - name : Create GitHub Release
5568 uses : softprops/action-gh-release@v2
56- if : startsWith(github.ref, 'refs/tags/v')
5769 with :
58- files : |
59- kman-amd64
60- kman-arm64
61- kman-386
62- kman-riscv64
70+ files : ./artifacts/**/* # 👈 one-liner to upload everything!
6371 token : ${{ secrets.RELEASE_PAT }}
64-
0 commit comments