fix: include release notes in Gitea API payload
CI / cargo fmt --check (push) Successful in 29s
CI / cargo clippy (push) Successful in 35s
CI / cargo test (push) Successful in 52s
Release / build x86_64-unknown-linux-gnu (push) Successful in 50s
Release / build x86_64-unknown-linux-musl (push) Successful in 56s
CI / editor keymaps (push) Successful in 1m55s
Release / build aarch64-unknown-linux-gnu (push) Successful in 3m16s
Release / build aarch64-unknown-linux-musl (push) Successful in 4m23s
Release / gitea release (push) Successful in 1m40s
CI / cargo fmt --check (push) Successful in 29s
CI / cargo clippy (push) Successful in 35s
CI / cargo test (push) Successful in 52s
Release / build x86_64-unknown-linux-gnu (push) Successful in 50s
Release / build x86_64-unknown-linux-musl (push) Successful in 56s
CI / editor keymaps (push) Successful in 1m55s
Release / build aarch64-unknown-linux-gnu (push) Successful in 3m16s
Release / build aarch64-unknown-linux-musl (push) Successful in 4m23s
Release / gitea release (push) Successful in 1m40s
The release notes were generated but never passed to the Gitea API. Also suppress the expected 404 from the idempotency check.
This commit is contained in:
@@ -153,7 +153,7 @@ jobs:
|
||||
existing=$(curl --fail --silent --show-error -o /dev/null -w "%{http_code}" \
|
||||
-H "Authorization: token $RELEASE_TOKEN" \
|
||||
"$GITEA_SERVER/api/v1/repos/$REPO/releases/tags/$TAG" \
|
||||
|| true)
|
||||
2>/dev/null || true)
|
||||
if [ "$existing" = "200" ]; then
|
||||
echo "Release for $TAG already exists — fetching existing id"
|
||||
release_id=$(curl --fail --silent --show-error \
|
||||
@@ -161,8 +161,9 @@ jobs:
|
||||
"$GITEA_SERVER/api/v1/repos/$REPO/releases/tags/$TAG" \
|
||||
| jq -r '.id')
|
||||
else
|
||||
payload=$(jq -n --arg tag "$TAG" --arg name "$TAG" \
|
||||
'{tag_name: $tag, name: $name, draft: false, prerelease: false}')
|
||||
notes=$(cat release-notes.txt 2>/dev/null || echo "")
|
||||
payload=$(jq -n --arg tag "$TAG" --arg name "$TAG" --arg body "$notes" \
|
||||
'{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}')
|
||||
release_id=$(curl --fail --silent --show-error \
|
||||
-H "Authorization: token $RELEASE_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
|
||||
Reference in New Issue
Block a user