diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ba1f96a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Go Setup + uses: actions/setup-go@v6 + with: + go-version: 1.25 + - name: Run Release + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + 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..35054f6 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,27 @@ +before: + hooks: + - go mod download +builds: +- + main: ./main.go + binary: gobuildcache + ldflags: + - -s -w + goos: + - linux + - darwin + goarch: + - amd64 + - arm + - arm64 + goarm: + - 5 + - 6 + - 7 +archives: +- + id: gobuildcache + replacements: + darwin: Darwin + linux: Linux + amd64: x86_64