|
| 1 | +# Make sure to check the documentation at https://goreleaser.com |
| 2 | +release: |
| 3 | + draft: true |
| 4 | + replace_existing_draft: true |
| 5 | + |
| 6 | +before: |
| 7 | + hooks: |
| 8 | + # You may remove this if you don't use go modules. |
| 9 | + - go mod tidy |
| 10 | + # you may remove this if you don't need go generate |
| 11 | + - go generate ./... |
| 12 | +builds: |
| 13 | + - id: linux |
| 14 | + main: ./cmd/tkey-ssh-agent |
| 15 | + binary: tkey-ssh-agent |
| 16 | + env: |
| 17 | + - GOPROXY=https://proxy.golang.org,direct |
| 18 | + - GOSUMDB=sum.golang.org |
| 19 | + - CGO_ENABLED=0 |
| 20 | + |
| 21 | + goos: |
| 22 | + - linux |
| 23 | + goarch: |
| 24 | + - amd64 |
| 25 | + - arm64 |
| 26 | + flags: |
| 27 | + - -trimpath |
| 28 | + |
| 29 | + # Custom ldflags mostly to avoid setting main.date which for some |
| 30 | + # reason is default |
| 31 | + ldflags: |
| 32 | + -w -X main.version={{ .Version }} -X main.signerAppNoTouch= -buildid= |
| 33 | + |
| 34 | + - id: darwin |
| 35 | + main: ./cmd/tkey-ssh-agent |
| 36 | + binary: tkey-ssh-agent |
| 37 | + env: |
| 38 | + - GOPROXY=https://proxy.golang.org,direct |
| 39 | + - GOSUMDB=sum.golang.org |
| 40 | + - CGO_ENABLED=1 |
| 41 | + |
| 42 | + goos: |
| 43 | + - darwin |
| 44 | + goarch: |
| 45 | + - amd64 |
| 46 | + - arm64 |
| 47 | + flags: |
| 48 | + - -trimpath |
| 49 | + |
| 50 | + # Custom ldflags mostly to avoid setting main.date which for some |
| 51 | + # reason is default |
| 52 | + ldflags: |
| 53 | + -w -X main.version={{ .Version }} -X main.signerAppNoTouch= -buildid= |
| 54 | + |
| 55 | + - id: windows |
| 56 | + main: ./cmd/tkey-ssh-agent |
| 57 | + binary: tkey-ssh-agent |
| 58 | + env: |
| 59 | + - GOPROXY=https://proxy.golang.org,direct |
| 60 | + - GOSUMDB=sum.golang.org |
| 61 | + - CGO_ENABLED=0 |
| 62 | + |
| 63 | + goos: |
| 64 | + - windows |
| 65 | + goarch: |
| 66 | + - amd64 |
| 67 | + - arm64 |
| 68 | + flags: |
| 69 | + - -trimpath |
| 70 | + |
| 71 | + # Custom ldflags mostly to avoid setting main.date which for some |
| 72 | + # reason is default |
| 73 | + ldflags: |
| 74 | + -w -X main.version={{ .Version }} -X main.signerAppNoTouch= -buildid= |
| 75 | + |
| 76 | + hooks: |
| 77 | + pre: cd ./cmd/tkey-ssh-agent && go-winres make --arch amd64 |
| 78 | + |
| 79 | + - id: windows-tray |
| 80 | + main: ./cmd/tkey-ssh-agent-tray |
| 81 | + binary: tkey-ssh-agent-tray |
| 82 | + env: |
| 83 | + - GOPROXY=https://proxy.golang.org,direct |
| 84 | + - GOSUMDB=sum.golang.org |
| 85 | + - CGO_ENABLED=0 |
| 86 | + |
| 87 | + goos: |
| 88 | + - windows |
| 89 | + goarch: |
| 90 | + - amd64 |
| 91 | + - arm64 |
| 92 | + flags: |
| 93 | + - -trimpath |
| 94 | + |
| 95 | + # Custom ldflags mostly to avoid setting main.date which for some |
| 96 | + # reason is default |
| 97 | + ldflags: |
| 98 | + -w -H windowsgui -buildid= |
| 99 | + |
| 100 | + hooks: |
| 101 | + pre: cd ./cmd/tkey-ssh-agent-tray && go-winres make --arch amd64 |
| 102 | + |
| 103 | +universal_binaries: |
| 104 | + - ids: |
| 105 | + - darwin |
| 106 | + replace: true |
| 107 | + name_template: "tkey-ssh-agent" |
| 108 | + hooks: |
| 109 | + post: gon gon.hcl |
| 110 | + |
| 111 | +archives: |
| 112 | + - format: tar.gz |
| 113 | + allow_different_binary_count: true |
| 114 | + # this name template makes the OS and Arch compatible with the results of uname. |
| 115 | + name_template: >- |
| 116 | + {{ "tkey-ssh-agent" }}_ |
| 117 | + {{- .Version }}_ |
| 118 | + {{- title .Os }}_ |
| 119 | + {{- if eq .Arch "all" }}universal |
| 120 | + {{- else }}{{ .Arch }}{{ end }} |
| 121 | + {{- if .Arm }}v{{ .Arm }}{{ end }} |
| 122 | + # use zip for windows archives |
| 123 | + format_overrides: |
| 124 | + - goos: windows |
| 125 | + format: zip |
| 126 | + files: |
| 127 | + - src: system/tkey-ssh-agent.1 |
| 128 | + dst: man |
| 129 | + strip_parent: true |
| 130 | + |
| 131 | +nfpms: |
| 132 | + # note that this is an array of nfpm configs |
| 133 | + - # |
| 134 | + # ID of the nfpm config, must be unique. |
| 135 | + |
| 136 | + # Name of the package. |
| 137 | + package_name: tkey-ssh-agent |
| 138 | + |
| 139 | + # Your app's vendor. |
| 140 | + vendor: Tillitis AB |
| 141 | + |
| 142 | + # Your app's homepage. |
| 143 | + homepage: https://tillitis.se/ |
| 144 | + |
| 145 | + # Your app's maintainer (probably you). |
| 146 | + maintainer: Tillitis <hello@tillitis.se> |
| 147 | + |
| 148 | + # Your app's description. |
| 149 | + description: |- |
| 150 | + SSH agent backed by Tillitis TKey |
| 151 | + tkey-ssh-agent is an alternative SSH agent backed by a private ed25519 key |
| 152 | + residing in the hardware TKey, a USB stick. |
| 153 | +
|
| 154 | + # Your app's license. |
| 155 | + license: GPL 2.0 |
| 156 | + |
| 157 | + # Formats to be generated. |
| 158 | + formats: |
| 159 | + - apk |
| 160 | + - deb |
| 161 | + - rpm |
| 162 | + - archlinux # Since: v1.13 |
| 163 | + |
| 164 | + dependencies: |
| 165 | + - pinentry-gnome3 | pinentry |
| 166 | + |
| 167 | + bindir: /usr/bin |
| 168 | + |
| 169 | + release: 1 |
| 170 | + |
| 171 | + section: misc |
| 172 | + |
| 173 | + # Contents to add to the package. |
| 174 | + # GoReleaser will automatically add the binaries. |
| 175 | + contents: |
| 176 | + - src: system/tkey-ssh-agent.1 |
| 177 | + dst: /usr/share/man/man1/tkey-ssh-agent.1 |
| 178 | + file_info: |
| 179 | + mode: 0644 |
| 180 | + |
| 181 | + - src: system/tkey-ssh-agent.service |
| 182 | + dst: /usr/lib/systemd/user/tkey-ssh-agent.service |
| 183 | + file_info: |
| 184 | + mode: 0644 |
| 185 | + |
| 186 | + - src: system/60-tkey.rules |
| 187 | + dst: /usr/lib/udev/rules.d/60-tkey.rules |
| 188 | + file_info: |
| 189 | + mode: 0644 |
| 190 | + |
| 191 | + - src: system/copyright |
| 192 | + dst: /usr/share/docs/tkey-ssh-agent/ |
| 193 | + file_info: |
| 194 | + mode: 0644 |
| 195 | + |
| 196 | + |
| 197 | + # Scripts to execute during the installation of the package. (overridable) |
| 198 | + scripts: |
| 199 | + postinstall: "system/postinst" |
| 200 | + |
| 201 | + # Custom configuration applied only to the Deb packager. |
| 202 | + deb: |
| 203 | + # Lintian overrides |
| 204 | + lintian_overrides: |
| 205 | + - statically-linked-binary |
| 206 | + - changelog-file-missing-in-native-package |
| 207 | + |
| 208 | + |
| 209 | +checksum: |
| 210 | + name_template: 'checksums.txt' |
| 211 | +snapshot: |
| 212 | + name_template: "{{ incpatch .Version }}-next" |
| 213 | +changelog: |
| 214 | + sort: |
| 215 | + filters: |
| 216 | + exclude: |
| 217 | + - '^docs:' |
| 218 | + - '^test:' |
| 219 | + |
0 commit comments