Skip to content

Commit

Permalink
Merge pull request #40 from profefe/chore/release-to-krew
Browse files Browse the repository at this point in the history
chore(kubectl): use github action to update krew index
  • Loading branch information
gianarb authored Apr 4, 2020
2 parents 8110f79 + 6ac4fdf commit 66e8f67
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 32 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,33 @@ name: goreleaser
on:
push:
branches-ignore:
- '**'
- "**"
tags:
- 'v*.*.*'
- "v*.*.*"

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v1
- uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
email: ${{ secrets.DOCKER_USERNAME }}
-
name: Set up Go
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13.x
-
name: Run GoReleaser
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1.2.0
with:
version: v0.123.0
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update new version for plugin 'profefe' in krew-index
uses: rajatjindal/krew-release-bot@v0.0.37
with:
krew_template_file: .krew/profefe.yaml
48 changes: 24 additions & 24 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,40 @@ before:
# you may remove this if you don't use vgo
- go mod download
builds:
- id: "kubectl-profefe"
main: ./cmd/kubectl-profefe
binary: kubectl-profefe
env:
- CGO_ENABLED=0
- id: "kprofefe"
main: ./cmd/kprofefe
binary: kprofefe
env:
- CGO_ENABLED=0
- id: "kubectl-profefe"
main: ./cmd/kubectl-profefe
binary: kubectl-profefe
env:
- CGO_ENABLED=0
- id: "kprofefe"
main: ./cmd/kprofefe
binary: kprofefe
env:
- CGO_ENABLED=0
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}"
checksum:
name_template: 'checksums.txt'
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- "^docs:"
- "^test:"
dockers:
-
binaries:
- kprofefe
- binaries:
- kprofefe
goos: linux
goarch: amd64
image_templates:
- "profefe/kprofefe:latest"
- "profefe/kprofefe:{{ .Tag }}"
- "profefe/kprofefe:latest"
- "profefe/kprofefe:{{ .Tag }}"
dockerfile: Dockerfile.gorelease
38 changes: 38 additions & 0 deletions .krew/profefe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: profefe
spec:
version: { { .TagName } }
homepage: https://github.com/profefe/kube-profefe
shortDescription: Gather and manage pprof profiles from running pods
description: |
This plugin helps to manage pprof profiles via Profefe. It allows to
collect profiles from running pods with Profefe and retrieve or inspect
profiles stored in Profefe. For more information about Profefe, visit
https://profefe.dev
platforms:
- selector:
matchLabels:
os: darwin
arch: amd64
uri: "https://github.com/profefe/kube-profefe/releases/download/{{ .TagName }}/kube-profefe_{{ .TagName }}_Darwin_x86_64.tar.gz"
sha256: a2dd151fcaf3b7e4341986c6cc2726e0dccc69d634fc96a0ac97f8b03ad930a5
bin: kubectl-profefe
files:
- from: kubectl-profefe
to: .
- from: LICENSE
to: .
- selector:
matchLabels:
os: linux
arch: amd64
uri: "https://github.com/profefe/kube-profefe/releases/download/{{ .TagName }}/kube-profefe_{{ .TagName }}_Linux_x86_64.tar.gz"
sha256: b68479389df557dd29abd42268fdd9fc22b522a1dfe97458bfb5f804da1f6445
bin: kubectl-profefe
files:
- from: kubectl-profefe
to: .
- from: LICENSE
to: .

0 comments on commit 66e8f67

Please # to comment.