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

Add target_commitish to goreleaser spec #950

Merged
merged 1 commit into from
Sep 16, 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
9 changes: 4 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Build

on:
push:
branches: [ master, devel ]
branches: [master, v4.0]

pull_request:
branches: [ master, devel ]
branches: [master, v4.0]

# This ensures that previous jobs for the PR are canceled when the PR is
# updated.
Expand Down Expand Up @@ -35,7 +35,6 @@ jobs:
go test -v ./...
- uses: docker/setup-qemu-action@v3
- name: Check Goreleaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --skip-publish --skip-sign --clean --snapshot
args: release --skip=publish,sign --clean --snapshot
121 changes: 61 additions & 60 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
---
version: 2
project_name: directpv

release:
name_template: "Release version {{.Version}}"
name_template: "Release version {{.Version}}"

github:
target_commitish: "{{ .Commit }}"

github:
owner: minio
name: directpv

extra_files:
- glob: "*.minisig"
- glob: "*.zip"
extra_files:
- glob: "*.minisig"
- glob: "*.zip"

before:
hooks:
- go mod tidy -compat=1.22
- go mod download

builds:
-
main: ./cmd/directpv
- main: ./cmd/directpv
id: directpv
binary: directpv
goos:
Expand All @@ -35,8 +38,7 @@ builds:
ldflags:
- -s -w -X main.Version={{ .Tag }}

-
main: ./cmd/kubectl-directpv
- main: ./cmd/kubectl-directpv
id: kubectl-directpv
binary: kubectl-directpv
goos:
Expand All @@ -61,61 +63,60 @@ builds:
post: ./package.sh {{ .Path }}

archives:
-
allow_different_binary_count: true
- allow_different_binary_count: true
format: binary

changelog:
sort: asc

dockers:
- image_templates:
- "quay.io/minio/directpv:{{ .Tag }}-amd64"
use: buildx
goarch: amd64
ids:
- directpv
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
- AlmaLinux.repo
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "quay.io/minio/directpv:{{ .Tag }}-ppc64le"
use: buildx
goarch: ppc64le
ids:
- directpv
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
- AlmaLinux.repo
build_flag_templates:
- "--platform=linux/ppc64le"
- image_templates:
- "quay.io/minio/directpv:{{ .Tag }}-arm64"
use: buildx
goarch: arm64
ids:
- directpv
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
- AlmaLinux.repo
build_flag_templates:
- "--platform=linux/arm64"
- image_templates:
- "quay.io/minio/directpv:{{ .Tag }}-amd64"
use: buildx
goarch: amd64
ids:
- directpv
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
- AlmaLinux.repo
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "quay.io/minio/directpv:{{ .Tag }}-ppc64le"
use: buildx
goarch: ppc64le
ids:
- directpv
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
- AlmaLinux.repo
build_flag_templates:
- "--platform=linux/ppc64le"
- image_templates:
- "quay.io/minio/directpv:{{ .Tag }}-arm64"
use: buildx
goarch: arm64
ids:
- directpv
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
- AlmaLinux.repo
build_flag_templates:
- "--platform=linux/arm64"
docker_manifests:
- name_template: quay.io/minio/directpv:{{ .Tag }}
image_templates:
- quay.io/minio/directpv:{{ .Tag }}-amd64
- quay.io/minio/directpv:{{ .Tag }}-arm64
- quay.io/minio/directpv:{{ .Tag }}-ppc64le
- name_template: quay.io/minio/directpv:latest
image_templates:
- quay.io/minio/directpv:{{ .Tag }}-amd64
- quay.io/minio/directpv:{{ .Tag }}-arm64
- quay.io/minio/directpv:{{ .Tag }}-ppc64le
- name_template: quay.io/minio/directpv:{{ .Tag }}
image_templates:
- quay.io/minio/directpv:{{ .Tag }}-amd64
- quay.io/minio/directpv:{{ .Tag }}-arm64
- quay.io/minio/directpv:{{ .Tag }}-ppc64le
- name_template: quay.io/minio/directpv:latest
image_templates:
- quay.io/minio/directpv:{{ .Tag }}-amd64
- quay.io/minio/directpv:{{ .Tag }}-arm64
- quay.io/minio/directpv:{{ .Tag }}-ppc64le