Fixed workflow
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user