Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ split go releaser archives #3106

Merged
merged 2 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on:
push:
tags:
- 'v*'
- 'cli/v*'
- 'sdk/v*'

permissions:
contents: write
Expand Down
77 changes: 60 additions & 17 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

builds:
# server builds
- id: "kcp"
main: ./cmd/kcp
binary: bin/kcp
Expand All @@ -17,6 +18,8 @@ builds:
goarch: ppc64le
env:
- CGO_ENABLED=0
# plugin builds
# kubectl-kcp
- id: "kubectl-kcp"
main: ./cmd/kubectl-kcp
dir: cli
Expand All @@ -38,10 +41,33 @@ builds:
goarch: ppc64le
env:
- CGO_ENABLED=0
- id: "kubectl-workspace"
# kubectl-workspaces
- id: "kubectl-workspaces"
main: ./cmd/kubectl-workspace
dir: cli
binary: bin/kubectl-workspace
binary: bin/kubectl-workspaces
ldflags:
- "{{ .Env.LDFLAGS }}"
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
- ppc64le
ignore:
- goos: darwin
goarch: ppc64le
- goos: windows
goarch: ppc64le
env:
- CGO_ENABLED=0
# kubectl-ws
- id: "kubectl-ws"
main: ./cmd/kubectl-workspace
dir: cli
binary: bin/kubectl-ws
ldflags:
- "{{ .Env.LDFLAGS }}"
goos:
Expand All @@ -57,10 +83,6 @@ builds:
goarch: ppc64le
- goos: windows
goarch: ppc64le
hooks:
post:
- ln -sf kubectl-workspace bin/kubectl-workspaces
- ln -sf kubectl-workspace bin/kubectl-ws
env:
- CGO_ENABLED=0
archives:
Expand All @@ -70,26 +92,23 @@ archives:
- id: kubectl-kcp-plugin
builds:
- kubectl-kcp
- kubectl-workspace
name_template: "kubectl-kcp-plugin_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- bin/kubectl-workspaces
- bin/kubectl-ws
# krew has separate archive as it supports only one binary per plugin
- id: kubectl-kcp-plugin-krew
- id: kubectl-ws-plugin
builds:
- kubectl-workspace
name_template: "kubectl-kcp-ws-plugin_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- bin/kubectl-ws
- kubectl-ws
name_template: "kubectl-ws-plugin_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
- id: kubectl-workspaces-plugin
builds:
- kubectl-workspaces
name_template: "kubectl-workspaces-plugin_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
release:
draft: true
mode: keep-existing

krews:
- name: ws
ids:
- kubectl-kcp-plugin-krew
- kubectl-ws-plugin
repository:
owner: kcp-dev
name: krew-index
Expand All @@ -99,3 +118,27 @@ krews:
KCP workspace cli plugin for kubectl. Enables you to manage your kcp workspaces.
short_description: "KCP workspace cli plugin for kubectl."
skip_upload: auto
- name: workspaces
ids:
- kubectl-workspaces-plugin
repository:
owner: kcp-dev
name: krew-index
token: "{{ .Env.KREW_GITHUB_TOKEN }}"
homepage: "https://kcp.io/"
description: |
KCP workspace cli plugin for kubectl. Enables you to manage your kcp workspaces.
short_description: "KCP workspace cli plugin for kubectl."
skip_upload: auto
- name: kcp
ids:
- kubectl-kcp-plugin
repository:
owner: kcp-dev
name: krew-index
token: "{{ .Env.KREW_GITHUB_TOKEN }}"
homepage: "https://kcp.io/"
description: |
KCP cli plugin for kubectl. Enables you to manage your kcp.
short_description: "KCP cli plugin for kubectl."
skip_upload: auto
Loading