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:
|
||||
|
||||
Reference in New Issue
Block a user