-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add goreleaser & binary publishing (#33)
* Add goreleaser Signed-off-by: Eytan Avisror <[email protected]> * fix dynamic versioning Signed-off-by: Eytan Avisror <[email protected]> * address comments Signed-off-by: Eytan Avisror <[email protected]>
- Loading branch information
Eytan Avisror
authored
Apr 8, 2022
1 parent
dbb7be8
commit 83c327b
Showing
6 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Release aws-auth binaries | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
releases-matrix: | ||
name: Release Go Binary | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.17 | ||
|
||
- name: GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# TODO: Test using krew-release-bot later | ||
|
||
# - name: Update new version in krew-index | ||
# uses: rajatjindal/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
bin/* | ||
coverage.txt | ||
coverage.html | ||
coverage.html | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# This is an example .goreleaser.yml file with some sensible defaults. | ||
# Make sure to check the documentation at https://goreleaser.com | ||
before: | ||
hooks: | ||
- go mod tidy | ||
- go generate ./... | ||
builds: | ||
- id: aws-auth | ||
main: ./ | ||
binary: aws-auth | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
ldflags: | ||
- -s | ||
- -w | ||
- -X github.com/keikoproj/aws-auth/cmd/cli.gitCommit={{.Commit}} | ||
- -X github.com/keikoproj/aws-auth/cmd/cli.buildDate={{.Date}} | ||
- -X github.com/keikoproj/aws-auth/cmd/cli.pkgVersion={{.Version}} | ||
archives: | ||
- builds: | ||
- aws-auth | ||
name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" | ||
wrap_in_directory: false | ||
format: tar.gz | ||
files: | ||
- LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters