From fb1d283018c9ef2b71b4e5e4b35c06dd57de04d2 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Fri, 29 Oct 2021 02:34:54 -0400 Subject: [PATCH] feat: add gitrelaser flow --- .github/workflows/release.yml | 26 ++++++++++++++++++++++++++ .gitignore | 5 ++++- .goreleaser.yml | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml create mode 100644 .goreleaser.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..599f57a336 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: release + +on: + push: + tags: + - v*.*.* + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: true + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: v0.183.0 + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index a9ca864199..fd0a0c95ac 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,7 @@ helm/test-values.yaml *.swp golangci-lint atlantis -.devcontainer \ No newline at end of file +.devcontainer + +# gitreleaser +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000000..248d424d80 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,34 @@ +env: + - CGO_ENABLED=0 +builds: + - targets: + - darwin_amd64 + - darwin_arm64 + - linux_386 + - linux_amd64 + - linux_arm + - linux_arm64 + - windows_386 + - windows_amd64 + +archives: + - id: zip + name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" + format: zip + files: + - none* + +checksum: + name_template: 'checksums.txt' + +changelog: + skip: true + +release: + github: + owner: runatlantis + name: atlantis + draft: true + +snapshot: + name_template: "{{ incpatch .Version }}-next"