fix(ci): release: sign deb and rpm packages with GPG key (#346)

Ayman Bagabas created

Change summary

.goreleaser.yml | 6 ++++++
1 file changed, 6 insertions(+)

Detailed changes

.goreleaser.yml 🔗

@@ -149,6 +149,12 @@ nfpms:
         dst: /usr/share/zsh/site-functions/_crush
       - src: ./manpages/crush.1.gz
         dst: /usr/share/man/man1/crush.1.gz
+    rpm:
+      signature:
+        key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
+    deb:
+      signature:
+        key_file: '{{ if ne (index .Env "GPG_KEY_PATH") "" }}{{ .Env.GPG_KEY_PATH }}{{ else }}{{ end }}'
 
 signs:
   - cmd: cosign