diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8bb627b..d8648d1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,17 +2,26 @@ name: release on: release: types: - - published - + - created jobs: - release: + goreleaser: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Build and copy binary - run: make build-docker - - name: Upload binary to release - uses: softprops/action-gh-release@v1 - if: ${{startsWith(github.ref, 'refs/tags/') }} + - + name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.23.1 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 with: - files: ./bin/efes \ No newline at end of file + version: '~> v2' + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..7fe2419 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,27 @@ +version: 2 + +before: + hooks: + - go mod download + +builds: + - env: + - CGO_ENABLED=0 + main: main.go + goos: + - linux + goarch: + - amd64 +archives: + - format: tar.gz + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" +checksum: + name_template: 'checksums.txt' +snapshot: + version_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:'