Skip to content

Commit

Permalink
Add goreleaser GitHub Action
Browse files Browse the repository at this point in the history
Signed-off-by: Marvin Beckers <mail@embik.me>
  • Loading branch information
embik committed May 16, 2024
1 parent 0c06f47 commit e2cb05a
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: release

on:
push:
tags:
- v*

permissions:
contents: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.4
with:
fetch-depth: 0

- uses: actions/setup-go@v5.0.1
with:
go-version: "1.22"

- name: Run goreleaser
uses: goreleaser/goreleaser-action@v5.1.0
with:
version: "1.26.1"
args: release --clean --config .goreleaser.yaml
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
74 changes: 74 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
project_name: kubectl-ephemeral
release:
github:
owner: embik
name: kubectl-ephemeral
builds:
- id: kubectl-ephemeral
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
ldflags:
- -s -w
- -extldflags "-static"
binary: kubectl-ephemeral
hooks: {}

archives:
- id: kubectl-ephemeral
builds:
- kubectl-ephemeral
format: tar.gz
format_overrides:
- goos: windows
format: zip
name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}"

checksum:
name_template: "{{ .ProjectName }}_checksums.txt"
algorithm: sha256

brews:
- repository:
owner: embik
name: homebrew-tap
branch: "kubectl-ephemeral-{{ .Tag }}"
pull_request:
enabled: true
draft: false
base:
owner: embik
name: homebrew-tap
branch: main
commit_author:
name: Marvin Beckers
email: git@beckers.dev
directory: Formula
homepage: "https://github.com/embik/kubectl-ephemeral"
license: "Apache-2.0"
dependencies:
- name: kubectl
description: "kubectl-ephemeral is a kubectl plugin to create ephemeral containers from a EphemeralContainer YAML specification."

krews:
- repository:
owner: embik
name: krew-index
branch: "kubectl-ephemeral-{{ .Tag }}"
pull_request:
enabled: true
base:
owner: embik
name: krew-index
branch: main
commit_author:
name: Marvin Beckers
email: git@beckers.dev
description: "kubectl-ephemeral is a kubectl plugin to create ephemeral containers from a EphemeralContainer YAML specification."
short_description: "Create ephemeral containers from YAML."

0 comments on commit e2cb05a

Please # to comment.