diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fe5b8b0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Release + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.23' + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..713be55 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,32 @@ +before: + hooks: + - go mod tidy + +builds: + - id: got + main: ./cmd/got + binary: got + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 + +archives: + - format: tar.gz + # use zip for windows archives + format_overrides: + - goos: windows + format: zip + +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' + - '^ci:' + - Merge pull request + - Merge branch \ No newline at end of file diff --git a/go.mod b/go.mod index 15e8099..ec54250 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/gotray/got -go 1.23.3 +go 1.21 + +toolchain go1.23.3 require ( github.com/fatih/color v1.18.0