Skip to content

Commit 95a7a4c

Browse files
ChiragAgg5kChirag Aggarwal
andauthored
fix(publish): surface osslsigncode output when verify fails (#314)
Drop set -e from the verify step so the assignment of osslsigncode's captured stderr/stdout no longer aborts the script before echoing it. Track exit codes per file and aggregate so both binaries are reported even if the first fails. Also fail with ::error:: annotations for visibility in the Actions UI. Co-authored-by: Chirag Aggarwal <chirag@appwrite.io>
1 parent 25b43d3 commit 95a7a4c

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/publish.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,23 +94,26 @@ jobs:
9494
9595
- name: Verify Windows signatures
9696
run: |
97-
set -euo pipefail
97+
set -uo pipefail
9898
9999
verify_signature() {
100100
local file="$1"
101-
local output
102-
101+
local output rc
103102
output="$(osslsigncode verify -in "$file" 2>&1)"
103+
rc=$?
104+
echo "--- $file (osslsigncode exit $rc) ---"
104105
echo "$output"
105106
106-
if ! grep -Fq "Succeeded" <<< "$output"; then
107-
echo "$file signature verification failed"
108-
exit 1
107+
if [ "$rc" -ne 0 ] || ! grep -Fq "Succeeded" <<< "$output"; then
108+
echo "::error::$file signature verification failed"
109+
return 1
109110
fi
110111
}
111112
112-
verify_signature build/appwrite-cli-win-x64.exe
113-
verify_signature build/appwrite-cli-win-arm64.exe
113+
final=0
114+
verify_signature build/appwrite-cli-win-x64.exe || final=1
115+
verify_signature build/appwrite-cli-win-arm64.exe || final=1
116+
exit "$final"
114117
115118
- name: Setup Node.js
116119
uses: actions/setup-node@v6

0 commit comments

Comments
 (0)