Compare commits
3 Commits
98e408cb85
...
d6d5b451cd
| Author | SHA1 | Date | |
|---|---|---|---|
| d6d5b451cd | |||
| 76747cf917 | |||
| 6e85991062 |
@@ -33,41 +33,6 @@ jobs:
|
|||||||
echo "PRERELEASE=false" >> "$GITHUB_ENV"
|
echo "PRERELEASE=false" >> "$GITHUB_ENV"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Extract matching CHANGELOG section
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
python3 - <<'PY'
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
version = os.environ["VERSION"]
|
|
||||||
changelog_path = Path("CHANGELOG.md")
|
|
||||||
|
|
||||||
if not changelog_path.exists():
|
|
||||||
body = f"# {version}\n\nNo CHANGELOG.md found."
|
|
||||||
Path("release_body.md").write_text(body, encoding="utf-8")
|
|
||||||
raise SystemExit(0)
|
|
||||||
|
|
||||||
text = changelog_path.read_text(encoding="utf-8")
|
|
||||||
|
|
||||||
pattern = re.compile(
|
|
||||||
rf"^##\s+\[?{re.escape(version)}\]?[^\n]*\n(.*?)(?=^##\s+\[?[0-9]|\Z)",
|
|
||||||
re.MULTILINE | re.DOTALL,
|
|
||||||
)
|
|
||||||
|
|
||||||
match = pattern.search(text)
|
|
||||||
if match:
|
|
||||||
body = match.group(1).strip()
|
|
||||||
else:
|
|
||||||
body = f"Release {version}"
|
|
||||||
|
|
||||||
if not body:
|
|
||||||
body = f"Release {version}"
|
|
||||||
|
|
||||||
Path("release_body.md").write_text(body + "\n", encoding="utf-8")
|
|
||||||
PY
|
|
||||||
|
|
||||||
- name: Log in to Gitea container registry
|
- name: Log in to Gitea container registry
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
@@ -104,6 +69,41 @@ jobs:
|
|||||||
docker tag "$IMAGE_NAME:$TAG" "$IMAGE_NAME:$CHANNEL"
|
docker tag "$IMAGE_NAME:$TAG" "$IMAGE_NAME:$CHANNEL"
|
||||||
docker push "$IMAGE_NAME:$CHANNEL"
|
docker push "$IMAGE_NAME:$CHANNEL"
|
||||||
|
|
||||||
|
- name: Extract matching CHANGELOG section
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
python3 - <<'PY'
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
version = os.environ["VERSION"]
|
||||||
|
changelog_path = Path("lst_v3/CHANGELOG.md")
|
||||||
|
|
||||||
|
if not changelog_path.exists():
|
||||||
|
Path("release_body.md").write_text(f"Release {version}\n", encoding="utf-8")
|
||||||
|
raise SystemExit(0)
|
||||||
|
|
||||||
|
text = changelog_path.read_text(encoding="utf-8")
|
||||||
|
|
||||||
|
pattern = re.compile(
|
||||||
|
rf"^##\s+\[?{re.escape(version)}\]?[^\n]*\n(.*?)(?=^##\s+\[?[0-9]|\Z)",
|
||||||
|
re.MULTILINE | re.DOTALL,
|
||||||
|
)
|
||||||
|
|
||||||
|
match = pattern.search(text)
|
||||||
|
if match:
|
||||||
|
body = match.group(1).strip()
|
||||||
|
else:
|
||||||
|
body = f"Release {version}"
|
||||||
|
|
||||||
|
if not body:
|
||||||
|
body = f"Release {version}"
|
||||||
|
|
||||||
|
Path("release_body.md").write_text(body + "\n", encoding="utf-8")
|
||||||
|
print(body)
|
||||||
|
PY
|
||||||
|
|
||||||
- name: Create Gitea release
|
- name: Create Gitea release
|
||||||
env:
|
env:
|
||||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
@@ -116,6 +116,7 @@ jobs:
|
|||||||
import os
|
import os
|
||||||
import urllib.request
|
import urllib.request
|
||||||
import urllib.error
|
import urllib.error
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
tag = os.environ["TAG"]
|
tag = os.environ["TAG"]
|
||||||
prerelease = os.environ["PRERELEASE"].lower() == "true"
|
prerelease = os.environ["PRERELEASE"].lower() == "true"
|
||||||
@@ -123,54 +124,7 @@ jobs:
|
|||||||
repo = os.environ["GITEA_REPOSITORY"]
|
repo = os.environ["GITEA_REPOSITORY"]
|
||||||
token = os.environ["RELEASE_TOKEN"]
|
token = os.environ["RELEASE_TOKEN"]
|
||||||
|
|
||||||
image_name = os.environ["IMAGE_NAME"]
|
body = Path("release_body.md").read_text(encoding="utf-8").strip()
|
||||||
tag = os.environ["TAG"]
|
|
||||||
|
|
||||||
with open("release_body.md", "r", encoding="utf-8") as f:
|
|
||||||
changelog_body = f.read()
|
|
||||||
|
|
||||||
header = (
|
|
||||||
"## 🚀 How to run this release\n\n"
|
|
||||||
"### Pull image\n"
|
|
||||||
f"```bash\n"
|
|
||||||
f"docker pull {image_name}:{tag}\n"
|
|
||||||
f"```\n\n"
|
|
||||||
"### Run container\n"
|
|
||||||
f"```bash\n"
|
|
||||||
f"docker run -d \\\n"
|
|
||||||
f" --name lst \\\n"
|
|
||||||
f" -p 3000:3000 \\\n"
|
|
||||||
f" {image_name}:{tag}\n"
|
|
||||||
f"```\n\n"
|
|
||||||
"---\n\n"
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
version = os.environ["VERSION"]
|
|
||||||
changelog_path = Path("CHANGELOG.md")
|
|
||||||
|
|
||||||
if not changelog_path.exists():
|
|
||||||
Path("release_body.md").write_text(f"Release {version}\n", encoding="utf-8")
|
|
||||||
raise SystemExit(0)
|
|
||||||
|
|
||||||
text = changelog_path.read_text(encoding="utf-8")
|
|
||||||
|
|
||||||
pattern = re.compile(
|
|
||||||
rf"^##\s+{re.escape(version)}(?:\s*\([^)]+\))?\n(.*?)(?=^##\s+[0-9]|\Z)",
|
|
||||||
re.MULTILINE | re.DOTALL,
|
|
||||||
)
|
|
||||||
|
|
||||||
match = pattern.search(text)
|
|
||||||
|
|
||||||
if match:
|
|
||||||
body = match.group(1).strip()
|
|
||||||
else:
|
|
||||||
body = f"Release {version}"
|
|
||||||
|
|
||||||
Path("release_body.md").write_text(body + "\n", encoding="utf-8")
|
|
||||||
|
|
||||||
url = f"{server_url}/api/v1/repos/{repo}/releases"
|
url = f"{server_url}/api/v1/repos/{repo}/releases"
|
||||||
payload = {
|
payload = {
|
||||||
|
|||||||
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,5 +1,17 @@
|
|||||||
# All Changes to LST can be found below.
|
# All Changes to LST can be found below.
|
||||||
|
|
||||||
|
## [0.1.0-alpha.11](https://git.tuffraid.net/cowch/lst_v3/compare/v0.1.0-alpha.10...v0.1.0-alpha.11) (2026-04-03)
|
||||||
|
|
||||||
|
|
||||||
|
### 🐛 Bug fixes
|
||||||
|
|
||||||
|
* **release:** typo that caused errors ([76747cf](https://git.tuffraid.net/cowch/lst_v3/commits/76747cf91738bd0d0530afcf7b4f51f0db11ca98))
|
||||||
|
|
||||||
|
|
||||||
|
### 🛠️ Code Refactor
|
||||||
|
|
||||||
|
* **release:** changes to only have the changelog in the release ([6e85991](https://git.tuffraid.net/cowch/lst_v3/commits/6e8599106298ed13febd069d6fda8b354efb5b7b))
|
||||||
|
|
||||||
## [0.1.0-alpha.10](https://git.tuffraid.net/cowch/lst_v3/compare/v0.1.0-alpha.9...v0.1.0-alpha.10) (2026-04-03)
|
## [0.1.0-alpha.10](https://git.tuffraid.net/cowch/lst_v3/compare/v0.1.0-alpha.9...v0.1.0-alpha.10) (2026-04-03)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "lst_v3",
|
"name": "lst_v3",
|
||||||
"version": "0.1.0-alpha.10",
|
"version": "0.1.0-alpha.11",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "lst_v3",
|
"name": "lst_v3",
|
||||||
"version": "0.1.0-alpha.10",
|
"version": "0.1.0-alpha.11",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dotenvx/dotenvx": "^1.57.0",
|
"@dotenvx/dotenvx": "^1.57.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lst_v3",
|
"name": "lst_v3",
|
||||||
"version": "0.1.0-alpha.10",
|
"version": "0.1.0-alpha.11",
|
||||||
"description": "The tool that supports us in our everyday alplaprod",
|
"description": "The tool that supports us in our everyday alplaprod",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user