refactor(build): added in more info to the relase section
This commit is contained in:
@@ -52,7 +52,7 @@ jobs:
|
|||||||
text = changelog_path.read_text(encoding="utf-8")
|
text = changelog_path.read_text(encoding="utf-8")
|
||||||
|
|
||||||
pattern = re.compile(
|
pattern = re.compile(
|
||||||
rf"^##\s+\[?{re.escape(version)}\]?(?:\s*-.*)?\n(.*?)(?=^##\s|\Z)",
|
rf"^##\s+\[?{re.escape(version)}\]?[^\n]*\n(.*?)(?=^##\s+\[?[0-9]|\Z)",
|
||||||
re.MULTILINE | re.DOTALL,
|
re.MULTILINE | re.DOTALL,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ jobs:
|
|||||||
if match:
|
if match:
|
||||||
body = match.group(1).strip()
|
body = match.group(1).strip()
|
||||||
else:
|
else:
|
||||||
body = text.strip()
|
body = f"Release {version}"
|
||||||
|
|
||||||
if not body:
|
if not body:
|
||||||
body = f"Release {version}"
|
body = f"Release {version}"
|
||||||
@@ -124,6 +124,19 @@ jobs:
|
|||||||
token = os.environ["RELEASE_TOKEN"]
|
token = os.environ["RELEASE_TOKEN"]
|
||||||
|
|
||||||
with open("release_body.md", "r", encoding="utf-8") as f:
|
with open("release_body.md", "r", encoding="utf-8") as f:
|
||||||
|
|
||||||
|
tag = os.environ["TAG"]
|
||||||
|
|
||||||
|
header = f"""## 🚀 How to run this release
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker pull {image_name}:{tag}
|
||||||
|
docker run -d -p 3000:3000 {image_name}:{tag}
|
||||||
|
|
||||||
|
```py
|
||||||
|
if "-" not in tag:
|
||||||
|
header += f"\n**Also available as:** `{image_name}:latest`\n\n"
|
||||||
|
|
||||||
body = f.read()
|
body = f.read()
|
||||||
|
|
||||||
image_name = os.environ["IMAGE_NAME"]
|
image_name = os.environ["IMAGE_NAME"]
|
||||||
|
|||||||
Reference in New Issue
Block a user