diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 392f7db..24a9d12 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,6 +60,29 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max + cli-binary: + name: CLI + runs-on: ubuntu-latest + permissions: + contents: write + if: github.ref_type == 'tag' + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + deploy: name: Deploy Backend runs-on: ubuntu-latest diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..a36a39c --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,13 @@ +builds: + - id: "tf-preview-gh" + main: ./cmd/tf-preview-gh + + env: + - CGO_ENABLED=0 + + goos: + - linux + - darwin + goarch: + - amd64 + - arm64