File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,6 +149,42 @@ jobs:
149149 echo "=== Downloaded artifacts ==="
150150 ls -lah /tmp/artifacts/ || echo "No artifacts"
151151
152+ - name : Sign metadata
153+ env :
154+ MINISIGN_SIGKEY : ${{ secrets.MINISIGN_SIGKEY }}
155+ MINISIGN_PASSWORD : ${{ secrets.MINISIGN_PASSWORD }}
156+ run : |
157+ if [ -z "${MINISIGN_SIGKEY:-}" ]; then
158+ echo "::warning::MINISIGN_SIGKEY not set; publishing unsigned metadata. Clients with signature verification enabled will reject this release."
159+ exit 0
160+ fi
161+
162+ sudo apt-get update
163+ sudo apt-get install -y minisign
164+
165+ mkdir -p "${HOME}/.minisign"
166+ printf '%s\n' "${MINISIGN_SIGKEY}" > "${HOME}/.minisign/minisign.key"
167+
168+ cd /tmp/artifacts
169+ shopt -s nullglob
170+ signed=0
171+ for f in *.sdb.zstd; do
172+ echo "Signing ${f}"
173+ # CI has no controlling tty, so minisign reads the key password from stdin.
174+ # Use the .sig extension to match soar's package signature convention.
175+ printf '%s\n' "${MINISIGN_PASSWORD}" \
176+ | minisign -S -s "${HOME}/.minisign/minisign.key" -m "${f}" -x "${f}.sig"
177+ signed=$((signed + 1))
178+ done
179+
180+ if [ "${signed}" -eq 0 ]; then
181+ echo "::error::No .sdb.zstd metadata found to sign"
182+ exit 1
183+ fi
184+
185+ echo "=== Signatures ==="
186+ ls -lah *.sig
187+
152188 - name : Create release
153189 env :
154190 GH_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments