mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-13 19:28:55 +00:00
Merge pull request #851 from evalsocket/fix-709
Feature - Added goreleaser for manging lifecycle of kyverno plugin
This commit is contained in:
commit
34fe483450
4 changed files with 74 additions and 2 deletions
31
.github/workflows/release.yaml
vendored
Normal file
31
.github/workflows/release.yaml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
name: releaser
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
|
||||
|
||||
jobs:
|
||||
releaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Unshallow
|
||||
run: git fetch --prune --unshallow
|
||||
-
|
||||
name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.14
|
||||
-
|
||||
name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
42
.goreleaser.yml
Normal file
42
.goreleaser.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
project_name: kyverno
|
||||
before:
|
||||
hooks:
|
||||
- go mod download
|
||||
builds:
|
||||
- id: kyverno
|
||||
main: cmd/cli/kubectl-kyverno/main.go
|
||||
binary: kyverno
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
- windows
|
||||
goarch:
|
||||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
goarm: [6, 7]
|
||||
archives:
|
||||
- id: kyverno-archive
|
||||
name_template: |-
|
||||
kyverno_{{ .Tag }}_{{ .Os }}_{{ .Arch -}}
|
||||
{{- with .Arm -}}
|
||||
{{- if (eq . "6") -}}hf
|
||||
{{- else -}}v{{- . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
builds:
|
||||
- kyverno
|
||||
replacements:
|
||||
386: i386
|
||||
amd64: x86_64
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
||||
files: ["LICENSE"]
|
||||
checksum:
|
||||
name_template: "checksums.txt"
|
||||
algorithm: sha256
|
||||
release:
|
||||
prerelease: auto
|
|
@ -40,4 +40,4 @@ after_success:
|
|||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
||||
make docker-publish-initContainer
|
||||
make docker-publish-kyverno
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 7507b5c2da7823b75185c3a2bd18db6357937143
|
Loading…
Add table
Reference in a new issue