You've already forked CS-Box
Update .gitea/workflows/release.yaml
This commit is contained in:
@@ -98,26 +98,26 @@ jobs:
|
|||||||
|
|
||||||
# Build release JSON payload to a file (safe, avoids YAML quoting issues)
|
# Build release JSON payload to a file (safe, avoids YAML quoting issues)
|
||||||
python3 - <<'PY'
|
python3 - <<'PY'
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
|
||||||
tag = os.environ["TAG"]
|
tag = os.environ["TAG"]
|
||||||
|
|
||||||
with open("RELEASE_NOTES.md", "r", encoding="utf-8") as f:
|
with open("RELEASE_NOTES.md", "r", encoding="utf-8") as f:
|
||||||
body = f.read()
|
body = f.read()
|
||||||
|
|
||||||
payload = {
|
payload = {
|
||||||
"tag_name": tag,
|
"tag_name": tag,
|
||||||
"target_commitish": "main",
|
"target_commitish": "main",
|
||||||
"name": tag,
|
"name": tag,
|
||||||
"body": body,
|
"body": body,
|
||||||
"draft": False,
|
"draft": False,
|
||||||
"prerelease": False,
|
"prerelease": False,
|
||||||
}
|
}
|
||||||
|
|
||||||
with open("release.json", "w", encoding="utf-8") as f:
|
with open("release.json", "w", encoding="utf-8") as f:
|
||||||
json.dump(payload, f)
|
json.dump(payload, f)
|
||||||
PY
|
PY
|
||||||
|
|
||||||
# Create the release
|
# Create the release
|
||||||
curl -sS -X POST \
|
curl -sS -X POST \
|
||||||
@@ -129,15 +129,15 @@ PY
|
|||||||
|
|
||||||
# Extract release id
|
# Extract release id
|
||||||
release_id="$(python3 - <<'PY'
|
release_id="$(python3 - <<'PY'
|
||||||
import json
|
import json
|
||||||
with open("release_response.json","r",encoding="utf-8") as f:
|
with open("release_response.json","r",encoding="utf-8") as f:
|
||||||
data=json.load(f)
|
data=json.load(f)
|
||||||
rid=data.get("id")
|
rid=data.get("id")
|
||||||
if not rid:
|
if not rid:
|
||||||
raise SystemExit("No release id returned. Response:\n" + json.dumps(data, indent=2))
|
raise SystemExit("No release id returned. Response:\n" + json.dumps(data, indent=2))
|
||||||
print(rid)
|
print(rid)
|
||||||
PY
|
PY
|
||||||
)"
|
)"
|
||||||
echo "Created release id: $release_id"
|
echo "Created release id: $release_id"
|
||||||
|
|
||||||
# Upload asset (keep display name exactly "Computing:Box Website.zip")
|
# Upload asset (keep display name exactly "Computing:Box Website.zip")
|
||||||
|
|||||||
Reference in New Issue
Block a user