diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml new file mode 100644 index 0000000..c0dece9 --- /dev/null +++ b/.github/workflows/goreleaser.yml @@ -0,0 +1,21 @@ +name: goreleaser + +on: + push: + tags: + - "v*.*.*" + +jobs: + goreleaser: + name: release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: '1.20' + - uses: goreleaser/goreleaser-action@v1 + with: + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index f47cb20..ebc0987 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.out +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..7c935d3 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,22 @@ +project_name: tg +builds: + - id: tg + main: ./cmd/tg + binary: tg + goos: + - darwin + - linux + goarch: + - amd64 + - arm64 +archives: + - id: default + name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}' + format: tar.gz +checksum: + name_template: '{{ .ProjectName }}_v{{ .Version }}_checksums.txt' + algorithm: sha256 +changelog: + use: github-native +source: + enabled: false