-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1c742db
Showing
8 changed files
with
110 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# from https://dev.to/koddr/github-action-for-release-your-go-projects-as-fast-and-easily-as-possible-20a2 | ||
name: Release koi | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" # triggers only if push new tag version, like `0.8.4` or else | ||
|
||
jobs: | ||
build: | ||
name: GoReleaser build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Set fetch-depth: 0 to fetch all history for all branches and tags | ||
|
||
- name: Set up Go 1.17 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
id: go | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@master | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }} | ||
|
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,2 @@ | ||
|
||
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,49 @@ | ||
|
||
# This is an example .goreleaser.yml file with some sensible defaults. | ||
# Make sure to check the documentation at https://goreleaser.com | ||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod tidy | ||
- go test ./... | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
main: main.go | ||
binary: koi | ||
|
||
archives: | ||
- replacements: | ||
amd64: x86_64 | ||
files: | ||
- README.md | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
|
||
# From: https://medium.com/@ben.lafferty/deploying-go-cli-applications-316e9cca16a4 | ||
brews: | ||
- tap: | ||
owner: oliverisaac | ||
name: homebrew-tap | ||
folder: Formula | ||
homepage: https://github.com/oliverisaac/koi | ||
description: Kubectl wrapper command | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
- 'README' | ||
- Merge pull request | ||
- Merge branch |
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,9 @@ | ||
|
||
release: | ||
[[ $$( git rev-parse --abbrev-ref HEAD ) == "main" ]] # make sure we are on main | ||
git push origin main | ||
git tag $$( git tag | grep "^v" | sort --version-sort | tail -n 1 | awk -F. '{OFS="."; $$3 = $$3 + 1; print}' ) | ||
git push --tags | ||
|
||
goreleaser: | ||
goreleaser --snapshot --skip-publish --rm-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,5 @@ | ||
# koi | ||
|
||
Koi is a wrapper around kubectl that provides additional features: | ||
|
||
## -x shorthand flag for --context |
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,3 @@ | ||
module github.com/oliverisaac/koi | ||
|
||
go 1.17 |
Empty file.
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,9 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
func main() { | ||
fmt.Println("hello world") | ||
} |