Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
Goreleaser added with github action to build and release
Browse files Browse the repository at this point in the history
  • Loading branch information
nityanandagohain committed Sep 13, 2020
1 parent 0b3754c commit b13358d
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflow/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release with goreleaser
on:
push:
branches:
- master
- github-action
tags:
- v*.*.*
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Unshallow Fetch
run: git fetch --prune --unshallow
- uses: actions/setup-go@v2
with:
go-version: '^1.13.0'
- name: Release via goreleaser
uses: goreleaser/goreleaser-action@master
with:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.MYSECRET }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
50 changes: 50 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
before:
hooks:
- go mod download
# - go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
archives:
-
name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
format: binary
-
id: homebrew
name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

brews:
-
name: lazykubernetes
tap:
owner: yolossn
name: homebrew-tap
url_template: "https://github.com/yolossn/lazykubernetes/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
homepage: https://github.com/yolossn/lazykubernetes
test: |
system "#{bin}/lazykubernetes --version"
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func main() {
if err != nil {
panic(err)
}

// _, _ = k8sClient.GetServerInfo()
ui, err := app.NewApp(k8sClient)
if err != nil {
panic(err)
Expand Down

0 comments on commit b13358d

Please sign in to comment.