diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6e07c05..4fb7f78 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,4 +1,4 @@ -name: "CI" +name: "RELEASE" on: push: branches: @@ -7,7 +7,7 @@ on: - 'v[0-9]+.[0-9]+.[0-9]+' jobs: - test: + release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -22,10 +22,11 @@ jobs: export GIT_SHA=`git rev-parse HEAD` - name: Release - uses: goreleaser/goreleaser-action@v4 + uses: goreleaser/goreleaser-action@v5 with: + distribution: goreleaser version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GIT_SHA: ${{ env.GIT_SHA }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f6f7780..34504d9 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -5,11 +5,11 @@ builds: - env: - CGO_ENABLED=0 goos: - - linux + - linux - windows - darwin ldflags: - - -s -w -X "github.com/nebula-contrib/ngctl/pkg/version.GitRef={{ .Env.GIT_REF }}" -X "github.com/nebula-contrib/ngctl/pkg/version.GitSha={{ .Env.GIT_SHA }}" + - -s -w -X "github.com/nebula-contrib/ngctl/pkg/version.GitRef={{ .Branch }}" -X "github.com/nebula-contrib/ngctl/pkg/version.GitSha={{ .ShortCommit }}" binary: ngctl archives: - format: tar.gz @@ -26,7 +26,6 @@ archives: - goos: windows format: zip files: - - ngctl - LICENSE - README.md checksum: