fix release sync

This commit is contained in:
2026-08-12 20:49:36 +08:00
parent b6ecb2aa79
commit 8609d12179

View File

@@ -270,7 +270,7 @@ jobs:
run: | run: |
set -euo pipefail set -euo pipefail
test -n "$GITLAB_PAT" || { echo 'GITLAB_PAT is not configured' >&2; exit 0; } test -n "$GITLAB_PAT" || { echo 'GITLAB_PAT is not configured' >&2; exit 0; }
project_id="${GITLAB_PROJECT//\//%2F}" project_id="${GITLAB_PROJECT//\//%2F}"
api="https://gitlab.com/api/v4/projects/${project_id}" api="https://gitlab.com/api/v4/projects/${project_id}"
title=$(jq -r '.name // .tag_name' release.json) title=$(jq -r '.name // .tag_name' release.json)
@@ -284,7 +284,7 @@ jobs:
echo "GitLab release ${TAG} already exists; skipping" echo "GitLab release ${TAG} already exists; skipping"
exit 0 exit 0
fi fi
echo "Creating release on GitLab..." echo "Creating release on GitLab..."
curl -fsSL -X POST -H "PRIVATE-TOKEN: $GITLAB_PAT" \ curl -fsSL -X POST -H "PRIVATE-TOKEN: $GITLAB_PAT" \
-H 'Content-Type: application/json' --data "$payload" "${api}/releases" || true -H 'Content-Type: application/json' --data "$payload" "${api}/releases" || true