-
Notifications
You must be signed in to change notification settings - Fork 6
/
.goreleaser.yml
83 lines (79 loc) · 2.91 KB
/
.goreleaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Copyright (c) Mondoo, Inc.
# SPDX-License-Identifier: BUSL-1.1
---
version: 2
env:
- CGO_ENABLED=0
before:
hooks:
- go mod download
- make generate
# Check plugin compatibility with required version of the Packer SDK
- make plugin-check
builds:
# building the new packer-plugin-cnspec
- id: packer-plugin-cnspec-linux
binary: 'packer-plugin-cnspec_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
goos:
- linux
goarch:
- amd64
- '386'
- arm64
- arm
ldflags:
- -s -w -X go.mondoo.com/cnquery/v10.Version={{ .Env.CNSPEC_VERSION }} -X go.mondoo.com/packer-plugin-cnspec/version.Version={{.Version}} -X go.mondoo.com/packer-plugin-cnspec/version.Build={{.ShortCommit}} -X go.mondoo.com/packer-plugin-cnspec/version.Date={{.Date}}
- id: packer-plugin-cnspec-windows
binary: 'packer-plugin-cnspec_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
goos:
- windows
goarch:
- amd64
- arm64
ldflags:
- -s -w -X go.mondoo.com/cnquery/v10.Version={{ .Env.CNSPEC_VERSION }} -X go.mondoo.com/packer-plugin-cnspec/version.Version={{.Version}} -X go.mondoo.com/packer-plugin-cnspec/version.Build={{.ShortCommit}} -X go.mondoo.com/packer-plugin-cnspec/version.Date={{.Date}}
- id: packer-plugin-cnspec-darwin
binary: 'packer-plugin-cnspec_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
goos:
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w -X go.mondoo.com/cnquery/v10.Version={{ .Env.CNSPEC_VERSION }} -X go.mondoo.com/packer-plugin-cnspec/version.Version={{.Version}} -X go.mondoo.com/packer-plugin-cnspec/version.Build={{.ShortCommit}} -X go.mondoo.com/packer-plugin-cnspec/version.Date={{.Date}}
# building fall-back binaries
- id: packer-plugin-mondoo
binary: 'packer-plugin-mondoo_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64
ldflags:
- -s -w -X go.mondoo.com/packer-plugin-cnspec/version.Version={{.Version}} -X go.mondoo.com/packer-plugin-cnspec/version.Build={{.ShortCommit}} -X go.mondoo.com/packer-plugin-cnspec/version.Date={{.Date}}
archives:
- id: releases-packer-plugin-cnspec
builds:
- packer-plugin-cnspec-linux
- packer-plugin-cnspec-windows
- packer-plugin-cnspec-darwin
name_template: 'packer-plugin-cnspec_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
format: zip
files:
- none*
- id: releases-packer-plugin-mondoo
builds:
- packer-plugin-mondoo
name_template: 'packer-plugin-mondoo_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
format: zip
files:
- none*
checksum:
name_template: 'packer-plugin-cnspec_v{{ .Version }}_SHA256SUMS'
algorithm: sha256
snapshot:
name_template: "{{ .Tag }}-snapshot"
changelog:
use: github-native