Skip to content

Commit

Permalink
Release CLI with binaries on tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mraerino committed Apr 28, 2024
1 parent 324eb1b commit 0fec256
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
builds:
- id: "tf-preview-gh"
main: ./cmd/tf-preview-gh

env:
- CGO_ENABLED=0

goos:
- linux
- darwin
goarch:
- amd64
- arm64

0 comments on commit 0fec256

Please sign in to comment.