File tree Expand file tree Collapse file tree 3 files changed +44
-52
lines changed
Expand file tree Collapse file tree 3 files changed +44
-52
lines changed Original file line number Diff line number Diff line change @@ -13,27 +13,22 @@ jobs:
1313 runs-on : ubuntu-latest
1414
1515 steps :
16- - name : Download Go
17- uses : actions/setup-go@v5
18- with :
19- go-version : 1.21.1
20- id : go
21-
2216 - name : Check out repository
2317 uses : actions/checkout@v4
2418
25- - name : Build
26- run : |
27- echo "Tag that is going to be used as digger version: ${{ github.event.release.tag_name }}"
28- env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-X digger/pkg/utils.version=${{ github.event.release.tag_name }}" -o digger ./cli/cmd/digger
29-
3019 - name : Publish linux-x64 exec to github
31- id : upload-release-asset-linux-x64
32- uses : actions/upload-release-asset@v1
33- env :
34- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
20+ id : build-and-release-binary
21+ uses : wangyoucao577/go-release-action@8fa1e8368c8465264d64e0198208e10f71474c87 # v1.50
3522 with :
36- upload_url : ${{ github.event.release.upload_url }}
37- asset_path : ' digger'
38- asset_name : digger-cli-Linux-X64
39- asset_content_type : application/octet-stream
23+ github_token : ${{ secrets.GITHUB_TOKEN }}
24+ goos : linux
25+ goarch : amd64
26+ goversion : 1.21.1
27+ project_path : ./cli/cmd/digger
28+ binary_name : digger
29+ pre_command : export CGO_ENABLED=0
30+ ldflags : ${{ matrix.ldflags }}
31+ sha256sum : true
32+ md5sum : false
33+ asset_name : " digger-cli-Linux-X64"
34+ compress_assets : " OFF"
Original file line number Diff line number Diff line change @@ -22,18 +22,20 @@ jobs:
2222 - name : Check out repository
2323 uses : actions/checkout@v4
2424
25- - name : Build
26- run : |
27- echo "Tag that is going to be used as digger version: ${{ github.event.release.tag_name }}"
28- env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-X digger/pkg/utils.version=${{ github.event.release.tag_name }}" -o digger ./ee/cli/cmd/digger
29-
3025 - name : Publish linux-x64 exec to github
31- id : upload-release-asset-linux-x64
32- uses : actions/upload-release-asset@v1
33- env :
34- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26+ id : build-and-release-binary
27+ uses : wangyoucao577/go-release-action@8fa1e8368c8465264d64e0198208e10f71474c87 # v1.50
3528 with :
36- upload_url : ${{ github.event.release.upload_url }}
37- asset_path : ' digger'
38- asset_name : digger-ee-cli-Linux-X64
39- asset_content_type : application/octet-stream
29+ github_token : ${{ secrets.GITHUB_TOKEN }}
30+ goos : linux
31+ goarch : amd64
32+ goversion : 1.21.1
33+ project_path : ./cli/cmd/digger
34+ binary_name : digger
35+ pre_command : export CGO_ENABLED=0
36+ ldflags : ${{ matrix.ldflags }}
37+ sha256sum : true
38+ md5sum : false
39+ asset_name : " digger-ee-cli-Linux-X64"
40+ compress_assets : " OFF"
41+
Original file line number Diff line number Diff line change @@ -23,27 +23,22 @@ jobs:
2323 runs-on : ubuntu-latest
2424
2525 steps :
26- - name : Download Go
27- uses : actions/setup-go@v5
28- with :
29- go-version : 1.21.1
30- id : go
31-
3226 - name : Check out repository
3327 uses : actions/checkout@v4
3428
35- - name : Build
36- run : |
37- echo "Tag that is going to be used as digger version: ${{ github.event.release.tag_name }}"
38- env GOOS=${{matrix.os}} GOARCH=${{matrix.arch}} CGO_ENABLED=0 go build -ldflags="-X digger/pkg/utils.version=${{ github.event.release.tag_name }}" -o digger ./ee/cli/cmd/digger
39-
40- - name : Publish linux-x64 exec to github
41- id : upload-release-asset-linux-x64
42- uses : actions/upload-release-asset@v1
43- env :
44- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29+ - name : Build and publish binary artifact to GitHub
30+ id : build-and-release-binary
31+ uses : wangyoucao577/go-release-action@8fa1e8368c8465264d64e0198208e10f71474c87 # v1.50
4532 with :
46- upload_url : ${{ github.event.release.upload_url }}
47- asset_path : ' digger'
48- asset_name : digger-ee-cli-${{matrix.os}}-${{matrix.arch}}
49- asset_content_type : application/octet-stream
33+ github_token : ${{ secrets.GITHUB_TOKEN }}
34+ goos : ${{ matrix.os }}
35+ goarch : ${{ matrix.arch }}
36+ goversion : 1.21.1
37+ project_path : ./ee/cli/cmd/digger
38+ binary_name : digger
39+ pre_command : export CGO_ENABLED=0
40+ ldflags : ${{ matrix.ldflags }}
41+ sha256sum : true
42+ md5sum : false
43+ asset_name : " digger-ee-cli-${{matrix.os}}-${{matrix.arch}}"
44+ compress_assets : " OFF"
You can’t perform that action at this time.
0 commit comments