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

Generate .deb and .rpm packages #29

Merged
merged 2 commits into from
Jan 22, 2024
Merged
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
32 changes: 29 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,37 @@ before:
- go mod tidy

builds:
- env:
- id: linux-builds
env:
- CGO_ENABLED=0
goos:
- linux
binary: "stackit"

- id: windows-builds
env:
- CGO_ENABLED=0
goos:
- windows
binary: "stackit"

- id: macos-builds
env:
- CGO_ENABLED=0
goos:
- darwin
binary: "stackit"

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
# This name template makes the OS and Arch compatible with the results of `uname`
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
Expand All @@ -32,3 +44,17 @@ changelog:
exclude:
- "^docs:"
- "^test:"

nfpms:
- id: linux-packages
# IDs of the builds for which to create packages for
builds:
- linux-builds
vendor: STACKIT
homepage: https://github.com/stackitcloud/stackit-cli
maintainer: STACKIT <[email protected]>
description: A command-line interface to manage STACKIT resources.
license: Apache 2.0
formats:
- deb
- rpm