Fix manual release workflow script parsing
Some checks failed
build / ARM v8 (push) Has been cancelled
build / ARM v7 (push) Has been cancelled
build / i686 Linux (push) Has been cancelled
build / Cross-Mac aarch64 (push) Has been cancelled
build / i686 Win (push) Has been cancelled
build / RISCV 64bit (push) Has been cancelled
build / Cross-Mac x86_64 (push) Has been cancelled
build / x86_64 Linux (push) Has been cancelled
build / x86_64 Freebsd (push) Has been cancelled
build / Win64 (push) Has been cancelled
Some checks failed
build / ARM v8 (push) Has been cancelled
build / ARM v7 (push) Has been cancelled
build / i686 Linux (push) Has been cancelled
build / Cross-Mac aarch64 (push) Has been cancelled
build / i686 Win (push) Has been cancelled
build / RISCV 64bit (push) Has been cancelled
build / Cross-Mac x86_64 (push) Has been cancelled
build / x86_64 Linux (push) Has been cancelled
build / x86_64 Freebsd (push) Has been cancelled
build / Win64 (push) Has been cancelled
This commit is contained in:
@@ -49,13 +49,11 @@ jobs:
|
||||
"${get_release_url}")"
|
||||
|
||||
if [ "${status}" = "200" ]; then
|
||||
python3 - <<'PY' >> "$GITHUB_OUTPUT"
|
||||
import json
|
||||
with open('/tmp/release.json', 'r', encoding='utf-8') as f:
|
||||
python3 -c 'import json
|
||||
with open("/tmp/release.json", "r", encoding="utf-8") as f:
|
||||
data = json.load(f)
|
||||
print(f"release_id={data['id']}")
|
||||
print(f"release_name={data['name']}")
|
||||
PY
|
||||
print(f"release_id={data[\"id\"]}")
|
||||
print(f"release_name={data[\"name\"]}")' >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -65,18 +63,16 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python3 - <<'PY' > /tmp/release-payload.json
|
||||
import json, os
|
||||
payload = {
|
||||
"tag_name": os.environ["TAG_NAME"],
|
||||
"target_commitish": os.environ["TARGET_COMMITISH"],
|
||||
"name": os.environ["RELEASE_NAME"],
|
||||
"body": os.environ.get("RELEASE_NOTES", ""),
|
||||
"draft": False,
|
||||
"prerelease": False,
|
||||
}
|
||||
print(json.dumps(payload))
|
||||
PY
|
||||
python3 -c 'import json, os
|
||||
payload = {
|
||||
"tag_name": os.environ["TAG_NAME"],
|
||||
"target_commitish": os.environ["TARGET_COMMITISH"],
|
||||
"name": os.environ["RELEASE_NAME"],
|
||||
"body": os.environ.get("RELEASE_NOTES", ""),
|
||||
"draft": False,
|
||||
"prerelease": False,
|
||||
}
|
||||
print(json.dumps(payload))' > /tmp/release-payload.json
|
||||
|
||||
curl -sS \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
@@ -86,15 +82,13 @@ jobs:
|
||||
"${create_release_url}" \
|
||||
-o /tmp/release.json
|
||||
|
||||
python3 - <<'PY' >> "$GITHUB_OUTPUT"
|
||||
import json
|
||||
with open('/tmp/release.json', 'r', encoding='utf-8') as f:
|
||||
data = json.load(f)
|
||||
if 'id' not in data:
|
||||
raise SystemExit(json.dumps(data, indent=2))
|
||||
print(f"release_id={data['id']}")
|
||||
print(f"release_name={data['name']}")
|
||||
PY
|
||||
python3 -c 'import json
|
||||
with open("/tmp/release.json", "r", encoding="utf-8") as f:
|
||||
data = json.load(f)
|
||||
if "id" not in data:
|
||||
raise SystemExit(json.dumps(data, indent=2))
|
||||
print(f"release_id={data[\"id\"]}")
|
||||
print(f"release_name={data[\"name\"]}")' >> "$GITHUB_OUTPUT"
|
||||
|
||||
build-release:
|
||||
name: ${{ matrix.toolchain.name }}
|
||||
|
||||
Reference in New Issue
Block a user