diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..3b8509b --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,22 @@ +name: Release +on: + push: + tags: + - 'v*.*.*' +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + - name: GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cde0123 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..24b95fc --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,21 @@ +# 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 + # you may remove this if you don't need go generate + - go generate ./... +builds: + - env: + - CGO_ENABLED=0 + binary: kubectl-finalizers + goos: + - linux + - darwin + goarch: + - amd64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" diff --git a/.krew.yaml b/.krew.yaml new file mode 100644 index 0000000..d7a969e --- /dev/null +++ b/.krew.yaml @@ -0,0 +1,29 @@ +apiVersion: krew.googlecontainertools.github.com/v1alpha2 +kind: Plugin +metadata: + name: finalizers +spec: + version: {{ .TagName }} + homepage: https://github.com/ibuildthecloud/finalizers + platforms: + - selector: + matchLabels: + os: darwin + arch: amd64 + {{addURIAndSha "https://github.com/ibuildthecloud/finalizers/releases/download/{{ .TagName }}/finalizers_{{ .TagName }}_darwin_amd64.tar.gz" .TagName }} + files: + - from: "*" + to: "." + bin: kubectl-finalizers + - selector: + matchLabels: + os: linux + arch: amd64 + {{addURIAndSha "https://github.com/ibuildthecloud/finalizers/releases/download/{{ .TagName }}/finalizers_{{ .TagName }}_linux_amd64.tar.gz" .TagName }} + files: + - from: "*" + to: "." + bin: kubectl-finalizers + shortDescription: List objects blocked by finalizers. + description: | + List objects blocked by finalizers.