diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8a9e9d5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: goreleaser + +on: + push: + tags: + - "v*" # Will trigger only if tag is pushed matching pattern `v*` (Eg: `v0.1.0`) + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.21" + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v4 + with: + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 10620f7..02cceb2 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,22 +1,25 @@ -env: - - CGO_ENABLED=1 - before: hooks: - - make dist - + - go mod tidy + builds: - - binary: kaf-relay.bin - main: . + - env: + - CGO_ENABLED=1 + binary: kaf-relay goos: - windows + - darwin - linux + - freebsd + - openbsd - netbsd goarch: - amd64 archives: - format: tar.gz + rlcp: true files: + - config.toml.sample - README.md - LICENSE \ No newline at end of file