File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,11 +80,36 @@ jobs:
8080 - name : Build
8181 run : CGO_ENABLED=0 ${{ matrix.go-env.env }} go build -o out/
8282
83- - uses : actions/upload-artifact@v4
83+ - uses : actions/upload-artifact@v6
8484 with :
8585 name : ${{ matrix.go-env.name }}
8686 path : out/**/*
8787
88+ create-release :
89+ if : github.ref == 'refs/heads/main'
90+ needs : go-build
91+ runs-on : ubuntu-24.04
92+ permissions :
93+ contents : write
94+ timeout-minutes : 5
95+ steps :
96+ - uses : actions/download-artifact@v7
97+ with :
98+ path : build
99+
100+ - name : Create GitHub Release
101+ run : |
102+ set -u
103+ version=$(date +'%Y.%m.%d.%H.%M.%S')
104+ mkdir release
105+ for arch_dir in build/*; do
106+ arch=$(basename "$arch_dir")
107+ tar -czf "release/tsblock_${version}_${arch}.tar.gz" -C "$arch_dir" .
108+ done
109+ gh release create --repo "$GITHUB_REPOSITORY" --target "$GITHUB_SHA" --prerelease "$version" release/*
110+ env :
111+ GH_TOKEN : ${{ github.token }}
112+
88113 golangci-lint :
89114 runs-on : ubuntu-24.04
90115 permissions :
You can’t perform that action at this time.
0 commit comments