Skip to content

Commit 97233c3

Browse files
author
qectorlab
committed
feat: add GitHub release automation script for v1.0.4 tags
1 parent 18b95a7 commit 97233c3

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

‎scripts/publish_github_releases.py‎

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/usr/bin/env python3
2+
"""
3+
publish_github_releases.py — Publishes v1.0.4 GitHub Releases with release notes and binary assets.
4+
"""
5+
import os
6+
import sys
7+
import subprocess
8+
from pathlib import Path
9+
10+
ROOT = Path(__file__).resolve().parents[1]
11+
DIST_ASSETS = ROOT / "dist" / "release_assets"
12+
13+
REPOS = {
14+
"qectorlab/qector-decoder-workbench-linux": {
15+
"title": "QECTOR Decoder Workbench v1.0.4 (Linux Release)",
16+
"notes": "Official Linux distribution release for QECTOR Decoder Workbench v1.0.4 containing .deb package, portable .tar.gz, AppImage layout, Flatpak manifest, Snapcraft spec, RPM spec, SPDX SBOM, and SLSA Level 3 provenance attestation.",
17+
"assets": [
18+
DIST_ASSETS / "QectorWorkbench-v1.0.4-Linux-x64-Public.tar.gz",
19+
DIST_ASSETS / "qector-workbench_1.0.4_sbom.json",
20+
DIST_ASSETS / "attestation.intoto.jsonl",
21+
DIST_ASSETS / "SHA256SUMS.txt"
22+
]
23+
},
24+
"qectorlab/qector-decoder-workbench-macos": {
25+
"title": "QECTOR Decoder Workbench v1.0.4 (macOS Release)",
26+
"notes": "Official macOS distribution release for QECTOR Decoder Workbench v1.0.4 containing drag-and-drop .dmg installer, .app bundle, universal tarball, SPDX SBOM, and SLSA Level 3 provenance attestation.",
27+
"assets": [
28+
DIST_ASSETS / "QectorWorkbench-v1.0.4-macOS-Universal.tar.gz",
29+
DIST_ASSETS / "qector-workbench_1.0.4_sbom.json",
30+
DIST_ASSETS / "attestation.intoto.jsonl",
31+
DIST_ASSETS / "SHA256SUMS.txt"
32+
]
33+
},
34+
"iD01t/QECTOR-Workbench-MacOS": {
35+
"title": "QECTOR Decoder Workbench v1.0.4 (macOS Release)",
36+
"notes": "Official macOS distribution release for QECTOR Decoder Workbench v1.0.4 containing drag-and-drop .dmg installer, .app bundle, universal tarball, SPDX SBOM, and SLSA Level 3 provenance attestation.",
37+
"assets": [
38+
DIST_ASSETS / "QectorWorkbench-v1.0.4-macOS-Universal.tar.gz",
39+
DIST_ASSETS / "qector-workbench_1.0.4_sbom.json",
40+
DIST_ASSETS / "attestation.intoto.jsonl",
41+
DIST_ASSETS / "SHA256SUMS.txt"
42+
]
43+
}
44+
}
45+
46+
def publish_releases():
47+
print("========================================================================")
48+
print(" Publishing GitHub Releases (v1.0.4) across Repositories")
49+
print("========================================================================")
50+
51+
for repo, info in REPOS.items():
52+
print(f"\nPublishing release v1.0.4 for repository: {repo}...")
53+
cmd = [
54+
"gh", "release", "create", "v1.0.4",
55+
"--repo", repo,
56+
"--title", info["title"],
57+
"--notes", info["notes"],
58+
"--latest"
59+
]
60+
61+
valid_assets = [str(a) for a in info["assets"] if a.exists()]
62+
cmd.extend(valid_assets)
63+
64+
res = subprocess.run(cmd, capture_output=True, text=True)
65+
if res.returncode == 0:
66+
print(f" [SUCCESS] Release published: {res.stdout.strip()}")
67+
else:
68+
print(f" [INFO] Release response: {res.stdout.strip() or res.stderr.strip()}")
69+
70+
if __name__ == "__main__":
71+
publish_releases()

0 commit comments

Comments
 (0)