diff --git a/.github/workflows/release-github.yml b/.github/workflows/release-github.yml new file mode 100644 index 0000000..6572652 --- /dev/null +++ b/.github/workflows/release-github.yml @@ -0,0 +1,27 @@ +name: release-github + +on: + push: + tags: + - v* + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: setup go environment + uses: actions/setup-go@v4 + with: + go-version: '1.20' + check-latest: true + - name: run goreleaser + uses: goreleaser/goreleaser-action@v4 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..422cd4f --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,29 @@ +# Check the documentation at https://goreleaser.com for more options +builds: + - id: gha + main: ./cmd/gha + binary: gha + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm64 + ignore: + - goos: windows + goarch: arm64 + ldflags: + - -s -w +archives: + - format: tar.gz + format_overrides: + - goos: windows + format: zip + files: + - LICENSE +release: + prerelease: auto + draft: true