Skip to content

Commit

Permalink
feat: use goreleaser to replace the binary-release script (#1873)
Browse files Browse the repository at this point in the history
* feat: add goreleaser flow

* del binary-release script
  • Loading branch information
chenrui333 committed Oct 31, 2021
1 parent 8c9184b commit 2a0b780
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 51 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ helm/test-values.yaml
*.swp
golangci-lint
atlantis
.devcontainer
.devcontainer

# gitreleaser
dist/
34 changes: 34 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -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"
50 changes: 0 additions & 50 deletions scripts/binary-release.sh

This file was deleted.

0 comments on commit 2a0b780

Please sign in to comment.