diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 9e4d2b14..6e627526 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -23,6 +23,16 @@ jobs: uses: goreleaser/goreleaser-action@v4 with: version: latest - args: release --clean -f .goreleaser.prerelease.yml + args: release --clean --snapshot -f .goreleaser.prerelease.yml env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create prerelease + uses: softprops/action-gh-release@v2 + with: + prerelease: true + make_latest: false + name: "${{ github.ref }}prerelease-${{ github.sha }}" + files: | + dist/*.tar.gz + dist/checksum* diff --git a/.goreleaser.prerelease.yml b/.goreleaser.prerelease.yml index 391275c0..9a5b682e 100644 --- a/.goreleaser.prerelease.yml +++ b/.goreleaser.prerelease.yml @@ -5,7 +5,7 @@ builds: env: - CGO_ENABLED=0 ldflags: - - -s -w -X github.com/gadget-inc/dateilager/pkg/version.Version=v{{.Version}}-prerelease + - -s -w -X github.com/gadget-inc/dateilager/pkg/version.Version=v{{.Version}} goos: - linux - darwin @@ -18,7 +18,7 @@ builds: env: - CGO_ENABLED=0 ldflags: - - -s -w -X github.com/gadget-inc/dateilager/pkg/version.Version=v{{.Version}}-prerelease + - -s -w -X github.com/gadget-inc/dateilager/pkg/version.Version=v{{.Version}} goos: - linux - darwin @@ -38,13 +38,8 @@ checksum: - glob: ./dist/migrations.tar.gz archives: - - name_template: "{{ .ProjectName }}-v{{ .Version }}-PRERELEASE-{{ .Os }}-{{ .Arch }}" + - name_template: "{{ .ProjectName }}-v{{ .Version }}-{{ .Os }}-{{ .Arch }}" release: - version: - name_template: "{{ if .Tag }}{{ .Tag }}+{{ end }}pre-{{ .ShortCommit }}" - prerelease: true - draft: true - make_latest: false extra_files: - glob: ./dist/migrations.tar.gz