Merge pull request #21 from theupriser/feature/iso-release-notes

Feature/iso release notes
This commit is contained in:
theupriser authored and GitHub committed 2026-09-30 13:33:50 +02:00
commit 5eeac20444
3 files changed
+14 -7

No files matched your search

+3 -3
View File
@@ -55,14 +55,15 @@ jobs:
[ -n "$steamify" ] || { echo "::error::no VERSION in steamify.sh at $sref"; exit 1; }
fi
stamp="$(date -u +%y%m%d)" day="$(date -u +%Y.%m.%d)"
base="$(head -n 1 CHANGELOG.md | sed 's/^# *//')" # the CachyOS version (first line of the changelog)
kind="${{ inputs.kind }}"
if [ -z "$kind" ] || [ "$kind" = auto ]; then
if [ "${{ github.ref }}" = refs/heads/master ]; then kind=release; else kind=dev; fi
fi
if [ "$kind" = release ]; then
tag="v$steamify-$stamp" pre="" name="CachyOS with Steamify Live ISO $steamify ($day UTC)"
tag="v$steamify-$stamp" pre="" name="CachyOS $base with Steamify $steamify ($day UTC)"
else
tag="v$steamify-dev-$stamp" pre="--prerelease" name="CachyOS with Steamify Live ISO $steamify (test build $day UTC)"
tag="v$steamify-dev-$stamp" pre="--prerelease" name="CachyOS $base with Steamify $steamify (test build $day UTC)"
fi
# The ISO's file on the mirror is named after the tag (iso-2-gitea-build.yml, profiledef.sh), so its
# download link is known now.
@@ -71,7 +72,6 @@ jobs:
# - the CachyOS base version (first line of CHANGELOG.md, the fork's upstream changelog),
# - the Steamify version's own changelog section (steamify-cachyos CHANGELOG.md at the ref or tag it is built from),
# - this repository's commits since the previous release of the same kind.
base="$(head -n 1 CHANGELOG.md | sed 's/^# *//')"
steamify_notes="$(gh api "repos/theupriser/steamify-cachyos/contents/CHANGELOG.md?ref=${sref:-v$steamify}" -q .content 2> /dev/null | base64 -d 2> /dev/null |
awk -v v="$steamify" 'index($0, "## " v " ") == 1 {f = 1; next} f && /^## / {exit} f')"
[ "$kind" = release ] && want_pre=false || want_pre=true
+9 -4
View File
@@ -159,10 +159,11 @@ jobs:
[ -f "$iso" ] || { echo "::error::no ISO in out/desktop"; exit 1; }
tag="${{ github.ref_name }}" b="$STEAMIFY_BUILD_STAMP"
stamp="20${b:0:2}.${b:2:2}.${b:4:2}"
base="$(head -n 1 CHANGELOG.md | sed 's/^# *//')" # the CachyOS version, as in the GitHub release's title
if [ "$ISO_PRERELEASE" = true ]; then
name="CachyOS with Steamify Live ISO $STEAMIFY_VERSION (test build $stamp UTC)"
name="CachyOS $base with Steamify $STEAMIFY_VERSION (test build $stamp UTC)"
else
name="CachyOS with Steamify Live ISO $STEAMIFY_VERSION ($stamp UTC)"
name="CachyOS $base with Steamify $STEAMIFY_VERSION ($stamp UTC)"
fi
# One ISO per day and kind: a release of this tag from an earlier build of the day is replaced.
api="${{ github.server_url }}/api/v1/repos/${{ github.repository }}"
@@ -228,11 +229,15 @@ jobs:
run="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
api="https://api.github.com/repos/theupriser/steamify-cachyos-live-iso/releases"
curl -fsS -H "Authorization: Bearer $GH_TOKEN" "$api/tags/$tag" -o /tmp/rel.json || { echo "::warning::no GitHub release for $tag"; exit 0; }
ST="$st" COL="$col" RUN="$run" python3 - << 'PY'
ST="$st" COL="$col" RUN="$run" RUN_ID="${{ github.run_id }}" python3 - << 'PY'
import json, os, re
d = json.load(open("/tmp/rel.json"))
badge = f"[![ISO build](https://img.shields.io/badge/ISO_build-{os.environ['ST']}-{os.environ['COL']})]({os.environ['RUN']})"
body = d.get("body") or ""
# This runner reports its internal address (http://server:3000) as the server URL: the public one is in the
# release page link that iso-1 wrote into the notes.
m = re.search(r"\]\((https?://[^)\s]+)/releases/tag/", body)
run = f"{m.group(1)}/actions/runs/{os.environ['RUN_ID']}" if m else os.environ["RUN"]
badge = f"[![ISO build](https://img.shields.io/badge/ISO_build-{os.environ['ST']}-{os.environ['COL']})]({run})"
pat = re.compile(r"\[?!\[ISO build\]\([^)]*\)(\]\([^)]*\))?")
body = pat.sub(lambda m: badge, body, count=1) if pat.search(body) else badge + "\n\n" + body
json.dump({"body": body}, open("/tmp/patch.json", "w"))
+2
View File
@@ -144,3 +144,5 @@ Full write-up, with every trap: `steamify-iso-release` in steamify-cachyos-dev.
repository's commits since the previous release of the same kind (newest 40). iso-2 takes the same text from the GitHub
release for the mirror's release (one source), without the badge line, and adds the checksum line. The old hand-written
"## CachyOS with Steamify Live ISO" section in CHANGELOG.md is no longer used.
- **Release title:** `CachyOS <base> with Steamify <version> (<YYYY.MM.DD> UTC)` (dev: `(test build <date> UTC)`), the same on GitHub
and on the mirror; `<base>` is the first line of CHANGELOG.md (e.g. 26.08).