From 7dffaad8e5af11dc8c618476bdcf2a38664d1a21 Mon Sep 17 00:00:00 2001 From: Kolkman Date: Wed, 26 Aug 2026 22:40:39 +0200 Subject: [PATCH] Fixed workflow --- .gitea/workflows/release.yml | 25 ++++++++++++++++++++----- VIBE/CHAT_LOG.md | 6 ++++++ VIBE/PROMPTS.md | 1 + 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index dfc2f27..ac01a36 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -52,12 +52,19 @@ jobs: RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }} VERSION: ${{ steps.release.outputs.version }} run: | - response=$(curl --fail-with-body --silent --show-error \ + response_file=$(mktemp) + response_status=$(curl --silent --show-error -o "$response_file" -w '%{http_code}' \ -X POST \ -H "Authorization: token $RELEASE_TOKEN" \ -H 'Content-Type: application/json' \ -d "{\"tag_name\":\"v$VERSION\",\"name\":\"LinkLog $VERSION\",\"draft\":false,\"prerelease\":false}" \ https://git.kolkman.org/api/v1/repos/olaf/Link-Log/releases) + if [ "$response_status" -lt 200 ] || [ "$response_status" -ge 300 ]; then + cat "$response_file" >&2 + exit 1 + fi + response=$(cat "$response_file") + rm -f "$response_file" release_id=$(printf '%s' "$response" | jq -r '.id') test "$release_id" != null test "$release_id" != 0 @@ -70,16 +77,24 @@ jobs: UPLOAD_URL: ${{ steps.gitea_release.outputs.upload_url }} VERSION: ${{ steps.release.outputs.version }} run: | - curl --fail-with-body --silent --show-error \ + response_status=$(curl --silent --show-error -o /tmp/linklog-xpi-upload-response -w '%{http_code}' \ -X POST -H "Authorization: token $RELEASE_TOKEN" \ -H 'Content-Type: application/x-xpinstall' \ --data-binary "@XPI/signed/LinkLog-$VERSION.xpi" \ - "$UPLOAD_URL?name=LinkLog-$VERSION.xpi" - curl --fail-with-body --silent --show-error \ + "$UPLOAD_URL?name=LinkLog-$VERSION.xpi") + if [ "$response_status" -lt 200 ] || [ "$response_status" -ge 300 ]; then + cat /tmp/linklog-xpi-upload-response >&2 + exit 1 + fi + response_status=$(curl --silent --show-error -o /tmp/linklog-updates-upload-response -w '%{http_code}' \ -X POST -H "Authorization: token $RELEASE_TOKEN" \ -H 'Content-Type: application/json' \ --data-binary @webextension/updates.json \ - "$UPLOAD_URL?name=updates.json" + "$UPLOAD_URL?name=updates.json") + if [ "$response_status" -lt 200 ] || [ "$response_status" -ge 300 ]; then + cat /tmp/linklog-updates-upload-response >&2 + exit 1 + fi - name: Publish release links env: diff --git a/VIBE/CHAT_LOG.md b/VIBE/CHAT_LOG.md index 1dbe0d0..5bd34b3 100644 --- a/VIBE/CHAT_LOG.md +++ b/VIBE/CHAT_LOG.md @@ -1,5 +1,11 @@ # Chat Log +### User +The release server fails because its curl does not support `--fail-with-body`. + +### Assistant outcome +Replaced all three `--fail-with-body` uses in the release workflow with portable curl response capture and explicit HTTP status checks. Failed API and asset-upload responses now print their response body before exiting, while older curl versions remain supported. + ### User When posting to Mastodon change the formatting so there is an empty line between “From my #LinkLog:” and the title. diff --git a/VIBE/PROMPTS.md b/VIBE/PROMPTS.md index 5bfa05b..aa62ef5 100644 --- a/VIBE/PROMPTS.md +++ b/VIBE/PROMPTS.md @@ -208,6 +208,7 @@ 201. Below the Save profile button, add a link to download the signed plugin if it has not been downloaded yet. 202. Check the modified pages for the correct versioned signed XPI link. 203. When posting to Mastodon, add an empty line between "From my #LinkLog:" and the title. +204. Fix the release workflow because the runner's curl does not support `--fail-with-body`. ## Future entries