|
| 1 | +# Visit https://goreleaser.com for documentation on how to customize this |
| 2 | +# behavior. |
| 3 | +before: |
| 4 | + hooks: |
| 5 | + # this is just an example and not a requirement for provider building/publishing |
| 6 | + - go mod tidy |
| 7 | +builds: |
| 8 | + - env: |
| 9 | + # goreleaser does not work with CGO, it could also complicate |
| 10 | + # usage by users in CI/CD systems like Terraform Cloud where |
| 11 | + # they are unable to install libraries. |
| 12 | + - CGO_ENABLED=0 |
| 13 | + mod_timestamp: '{{ .CommitTimestamp }}' |
| 14 | + flags: |
| 15 | + - -trimpath |
| 16 | + ldflags: |
| 17 | + - '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}' |
| 18 | + goos: |
| 19 | + - freebsd |
| 20 | + - windows |
| 21 | + - linux |
| 22 | + - darwin |
| 23 | + goarch: |
| 24 | + - amd64 |
| 25 | + - '386' |
| 26 | + - arm |
| 27 | + - arm64 |
| 28 | + ignore: |
| 29 | + - goos: darwin |
| 30 | + goarch: '386' |
| 31 | + - goos: freebsd |
| 32 | + goarch: 'arm64' |
| 33 | + binary: 'keyfactor' |
| 34 | + id: "keyfactor" |
| 35 | + main: './cmd/keyfactor' |
| 36 | + hooks: |
| 37 | + pre: |
| 38 | + - cmd: sh -c "echo $(echo -n {{.Target}}; echo -n ' '; sha256sum {{.Name}}) > ${{ env.BUILD_ARTIFACT_DIR }}/vault_binary_checksums.txt" |
| 39 | +archives: |
| 40 | + - format: zip |
| 41 | + name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}' |
| 42 | +checksum: |
| 43 | + name_template: '{{ .ProjectName }}.{{ .Version }}.sha256' |
| 44 | + algorithm: sha256 |
| 45 | +signs: |
| 46 | + - artifacts: checksum |
| 47 | + args: |
| 48 | + # if you are using this in a GitHub action or some other automated pipeline, you |
| 49 | + # need to pass the batch flag to indicate its not interactive. |
| 50 | + - "--batch" |
| 51 | + - "--local-user" |
| 52 | + - "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key |
| 53 | + - "--output" |
| 54 | + - "${signature}" |
| 55 | + - "--detach-sign" |
| 56 | + - "${artifact}" |
| 57 | +release: |
| 58 | + prerelease: auto |
| 59 | + extra_files: |
| 60 | + - glob: 'installation.txt' |
| 61 | + - glob: 'LICENSE.txt' |
| 62 | + - glob: '${{ env.BUILD_ARTIFACT_DIR }}/vault_binary_checksums.txt' |
| 63 | + # If you want to manually examine the release before its live, uncomment this line: |
| 64 | + draft: true |
| 65 | +changelog: |
| 66 | + sort: asc |
| 67 | + use: github |
| 68 | + filters: |
| 69 | + exclude: |
| 70 | + - '^test:' |
| 71 | + - '^chore' |
| 72 | + - 'merge conflict' |
| 73 | + - Merge pull request |
| 74 | + - Merge remote-tracking branch |
| 75 | + - Merge branch |
| 76 | + - go mod tidy |
| 77 | + groups: |
| 78 | + - title: Dependency updates |
| 79 | + regexp: "^.*(feat|fix)\\(deps\\)*:+.*$" |
| 80 | + order: 300 |
| 81 | + - title: 'New Features' |
| 82 | + regexp: "^.*feat[(\\w)]*:+.*$" |
| 83 | + order: 100 |
| 84 | + - title: 'Bug fixes' |
| 85 | + regexp: "^.*fix[(\\w)]*:+.*$" |
| 86 | + order: 200 |
| 87 | + - title: 'Documentation updates' |
| 88 | + regexp: "^.*docs[(\\w)]*:+.*$" |
| 89 | + order: 400 |
| 90 | + - title: Other work |
| 91 | + order: 9999 |
0 commit comments