-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add deployment scripts without krew index.
- Loading branch information
Showing
5 changed files
with
130 additions
and
2 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,30 @@ | ||
name: release | ||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
jobs: | ||
job_build: | ||
name: goreleaser and build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- name: check gopath | ||
run: | | ||
export GOPATH=$(go env GOPATH) | ||
echo $GOPATH | ||
- name: GoReleaser | ||
uses: goreleaser/goreleaser-action@v2.4.1 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SECRET }} | ||
GOPATH: /home/runner/go | ||
# - name: Update new version in krew-index | ||
# uses: rajatjindal/krew-release-bot@v0.0.38 |
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 @@ | ||
.idea | ||
local_env.sh | ||
kubectl-cred | ||
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,53 @@ | ||
# This is an example goreleaser.yaml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
env: | ||
- GO111MODULE=on | ||
before: | ||
hooks: | ||
- go mod download | ||
builds: | ||
- binary: kubectl-cred | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- windows | ||
- darwin | ||
- linux | ||
goarch: | ||
- amd64 | ||
asmflags: | ||
- all=-trimpath={{.Env.GOPATH}} | ||
gcflags: | ||
- all=-trimpath={{.Env.GOPATH}} | ||
ldflags: | ||
- -s -w | ||
archives: | ||
- replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
amd64: x86_64 | ||
format: tar.gz | ||
name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" | ||
files: | ||
- LICENSE | ||
- README.md | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
release: | ||
github: | ||
owner: gjbae1212 | ||
name: kubectl-cred | ||
brews: | ||
- name: kubectl-cred | ||
tap: | ||
owner: gjbae1212 | ||
name: homebrew-kubectl-cred | ||
commit_author: | ||
name: gjbae1212 | ||
email: gjbae1212@gmail.com | ||
description: "kubectl-cred is a kubernetes plugin to which switch to contexts using an interactive CLI." |
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,44 @@ | ||
apiVersion: krew.googlecontainertools.github.com/v1alpha2 | ||
kind: Plugin | ||
metadata: | ||
name: cred | ||
spec: | ||
version: {{ .TagName }} | ||
homepage: https://github.com/gjbae1212/kubectl-cred | ||
shortDescription: kubectl-cred is a kubernetes plugin to which switch to contexts and namespaces and clusters using an interactive CLI. | ||
description: | | ||
kubectl-cred is a kubernetes plugin to which switch to contexts and namespaces and clusters using an interactive CLI. | ||
# Switch context using an interactive CLI. | ||
kubectl cred ctx | ||
# Switch namespace using an interactive CLI. | ||
kubectl cred ns | ||
# Show your all of contexts information formatted tree. | ||
kubectl cred ls | ||
# Show your current context information. | ||
kubectl cred current | ||
# Rename context name in k8s config, using an interactive CLI. | ||
kubectl cred rename | ||
platforms: | ||
- selector: | ||
matchLabels: | ||
os: darwin | ||
arch: amd64 | ||
{{addURIAndSha "https://github.com/gjbae1212/kubectl-cred/releases/download/{{ .TagName }}/kubectl-cred_{{ .TagName }}_Darwin_x86_64.tar.gz" .TagName }} | ||
bin: kubectl-cred | ||
- selector: | ||
matchLabels: | ||
os: linux | ||
arch: amd64 | ||
{{addURIAndSha "https://github.com/gjbae1212/kubectl-cred/releases/download/{{ .TagName }}/kubectl-cred_{{ .TagName }}_Linux_x86_64.tar.gz" .TagName }} | ||
bin: kubectl-cred | ||
- selector: | ||
matchLabels: | ||
os: windows | ||
arch: amd64 | ||
{{addURIAndSha "https://github.com/gjbae1212/kubectl-cred/releases/download/{{ .TagName }}/kubectl-cred_{{ .TagName }}_Windows_x86_64.tar.gz" .TagName }} | ||
bin: kubectl-cred.exe |
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