File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - ' v*'
7+ workflow_dispatch :
8+ inputs :
9+ tag :
10+ description : ' Tag to create release for (e.g., v1.0.0)'
11+ required : true
12+ type : string
13+
14+ env :
15+ TAG : ${{ inputs.tag || github.ref_name }}
716
817jobs :
918 build :
@@ -14,24 +23,27 @@ jobs:
1423 include :
1524 - arch : amd64
1625 - arch : arm64
26+ env :
27+ NAME : " linkwinbt-linux-${{ matrix.arch }}"
1728 steps :
1829 - uses : actions/checkout@v6
1930
2031 - name : Build binary
2132 run : |
2233 docker buildx build . \
2334 --target binary \
24- --build-arg TARGETOS=linux \
35+ --build-arg TARGETOS=$OS \
2536 --build-arg TARGETARCH=${{ matrix.arch }} \
2637 --output type=local,dest=build \
2738 --cache-from type=gha \
2839 --cache-to type=gha,mode=max
40+ mv ./build/linkwinbt ./build/${NAME}
2941
3042 - name : Upload binary artifact
3143 uses : actions/upload-artifact@v6
3244 with :
33- name : linkwinbt-linux- ${{ matrix.arch }}
34- path : build/linkwinbt*
45+ name : ${{ env.NAME }}
46+ path : build/${NAME}
3547 retention-days : 1
3648
3749 release :
@@ -52,13 +64,12 @@ jobs:
5264 env :
5365 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5466 run : |
55- TAG=${GITHUB_REF#refs/tags/}
5667 # Find all files in artifacts directory
5768 FILES=$(find artifacts -type f)
5869 echo "Files: ${FILES}"
5970
6071 # Create release with all artifact files
61- echo "$FILES" | xargs gh release create "$TAG" \
62- --title "$TAG" \
72+ echo "$FILES" | xargs gh release create "${{ env. TAG }} " \
73+ --title "${{ env. TAG }} " \
6374 --draft \
6475 --generate-notes
You can’t perform that action at this time.
0 commit comments