Author SHA1 Message Date
theupriser ec174cc7b7 Merge pull request #21 from theupriser/feature/iso-release-notes
Sync git.upriser.nl mirror / sync (push) Skipped
Feature/iso release notes
2026-09-30 13:33:50 +02:00
theupriser 66d4b6c91d feat(ci): release title CachyOS <base> with Steamify <version> on GitHub and on the mirror
Sync git.upriser.nl mirror / sync (push) Skipped
2026-09-30 13:33:03 +02:00
theupriser 63b2bb96a0 fix(ci): the badge links to the public Gitea address (the runner's own server URL is http://server:3000)
Sync git.upriser.nl mirror / sync (push) Skipped
2026-09-30 13:30:36 +02:00
theupriser e430e0bb01 Merge pull request #20 from theupriser/feature/iso-release-notes
Sync git.upriser.nl mirror / sync (push) Skipped
feat(ci): generated release notes (Steamify changelog and commits since the last release)
2026-09-30 13:30:21 +02:00
theupriser dac15ff9e4 feat(ci): release notes: wording when there is no earlier release to compare with
Sync git.upriser.nl mirror / sync (push) Skipped
2026-09-30 13:23:02 +02:00
theupriser 71d429915e feat(ci): release notes: clearer wording, workflow (ci) and docs commits left out of the ISO's change list, checksum section
Sync git.upriser.nl mirror / sync (push) Skipped
2026-09-30 13:22:47 +02:00
theupriser acde716b86 feat(ci): release notes are generated: the base version, Steamify's changelog section and the commits since the previous release; the mirror's release uses the same text 2026-09-30 13:20:22 +02:00
3 changed files with 59 additions and 18 deletions

No files matched your search

+33 -7
View File
@@ -38,6 +38,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Tag and release
env:
@@ -53,29 +55,53 @@ 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.
file="steamify-cachyos-${tag#v}-x86_64.iso" dl="$GITEA_URL/$GITEA_REPO/releases/download/$tag"
# The Steamify section of CHANGELOG.md ("## CachyOS with Steamify Live ISO"), without its heading.
section="$(awk '/^## CachyOS with Steamify Live ISO/ {found = 1; next} found && /^#/ {exit} found' CHANGELOG.md)"
# The notes are generated, nothing is written by hand:
# - 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.
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
[ "$kind" = release ] && kind_name="real release" || kind_name="dev build"
prev="$(gh release list -L 50 --json tagName,isPrerelease,createdAt -q "[.[] | select(.isPrerelease == $want_pre and .tagName != \"$tag\")] | sort_by(.createdAt) | reverse | .[0].tagName // empty")"
# Commits that change the ISO itself: not the workflow ones (type or scope ci, e.g. ci: / fix(ci):) and not docs:.
if [ -n "$prev" ] && git rev-parse -q --verify "refs/tags/$prev" > /dev/null; then
range="$prev..HEAD"; limit=40; since="Since \`$prev\`:"
else
range="HEAD"; limit=12; since="The latest commits (there is no earlier $kind_name to compare with):"
fi
changes="$(git log --no-merges --format='%s' "$range" | grep -Ev '^(ci|docs)(\(.*\))?:|^[a-z]+\(ci\):' | sed 's/^/- /' | head -n "$limit" || true)"
[ -n "$changes" ] || changes="- No changes to the ISO itself."
notes="![ISO build](https://img.shields.io/badge/ISO_build-running-yellow)
The ISO is built from \`$(git rev-parse --short HEAD)\` (${{ github.ref_name }}) with Steamify $steamify${sref:+ (branch $sref)} and published on the mirror (GitHub releases take at most 2 GB per file), about half an hour after this release (the mirror's sync, then the build):
**CachyOS $base with Steamify $steamify${sref:+ (branch $sref)} built in.** Install CachyOS and turn the PC into a Steam Machine in one go.
The ISO is built from \`$(git rev-parse --short HEAD)\` (${{ github.ref_name }}). It is about 3 GB, more than a GitHub release can hold (2 GB per file), so it is published on the mirror about 20 minutes after this release is created:
**Download: [$file]($dl/$file)** ([SHA-256]($dl/$file.sha256), [release page]($GITEA_URL/$GITEA_REPO/releases/tag/$tag))
Sources: [Steamify](https://github.com/theupriser/steamify-cachyos/tree/${sref:-v$steamify}), this repository at this tag, and the packages' sources at [CachyOS](https://github.com/CachyOS) and [Arch Linux](https://archlinux.org/packages/).
### Steamify $steamify
${steamify_notes:-There is no changelog section for this version.}
$section"
### Changes in this ISO
$since
$changes
### Sources
[Steamify](https://github.com/theupriser/steamify-cachyos/tree/${sref:-v$steamify}), this repository at this tag, and the packages' sources at [CachyOS](https://github.com/CachyOS) and [Arch Linux](https://archlinux.org/packages/)."
# One ISO per day and kind: the newest build of a day replaces the earlier one (space), here and on the mirror.
if git ls-remote --exit-code --tags origin "refs/tags/$tag" > /dev/null 2>&1 || gh release view "$tag" > /dev/null 2>&1; then
echo "$tag exists: replacing it"
+19 -11
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 }}"
@@ -173,15 +174,18 @@ jobs:
{ echo "publish=true"; echo "name=$name"; } >> "$GITHUB_OUTPUT"
section="$(awk '/^## CachyOS with Steamify Live ISO/ {found = 1; next} found && /^#/ {exit} found' CHANGELOG.md)"
src="${{ inputs.steamify_ref }}"; src="${src:-v$STEAMIFY_VERSION}"
# The same notes as the GitHub release (one source: iso-1 generated them), without its badge line; the
# checksum line is added here. Fallback: a short text.
if curl -fsS "https://api.github.com/repos/theupriser/steamify-cachyos-live-iso/releases/tags/$tag" -o /tmp/ghrel.json; then
jq -r '.body // ""' /tmp/ghrel.json | sed '/ISO build\]/d' > release-notes.md
else
echo "Built from \`$(git rev-parse --short HEAD)\` ($tag) with Steamify $STEAMIFY_VERSION." > release-notes.md # fallback when GitHub cannot be reached
fi
{
echo "Built from \`$(git rev-parse --short HEAD)\` ($tag) with Steamify $STEAMIFY_VERSION."
echo
echo "SHA-256: \`$(cut -d' ' -f1 "$iso.sha256")\`, label \`STEAMIFY_${STEAMIFY_VERSION//./_}_$b\`"
echo
echo "Sources: [Steamify](https://github.com/theupriser/steamify-cachyos/tree/$src), this repository at this tag, and the packages' sources at [CachyOS](https://github.com/CachyOS) and [Arch Linux](https://archlinux.org/packages/)."
echo
echo "$section"
} > release-notes.md
echo "### Checksum"
echo "SHA-256 of the ISO: \`$(cut -d' ' -f1 "$iso.sha256")\` (label \`STEAMIFY_${STEAMIFY_VERSION//./_}_$b\`)."
} >> release-notes.md
cat release-notes.md
- name: Publish ${{ github.ref_name }}
@@ -225,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"))
+7
View File
@@ -139,3 +139,10 @@ Full write-up, with every trap: `steamify-iso-release` in steamify-cachyos-dev.
iso-2's last job `report` (`if: always()`) replaces it with succeeded / failed / cancelled, linked to the Gitea run,
through the GitHub API with the Gitea secret `GH_RELEASE_TOKEN` (fine-grained, this repo, Contents read and write).
Without the secret the badge stays "running". Gitea's own badge can't show these runs (they run on a tag ref).
- **Release notes are generated, not written by hand** (iso-1): the CachyOS base version (first line of CHANGELOG.md), the
Steamify version's own changelog section (steamify-cachyos CHANGELOG.md at the ref or tag it is built from) and this
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).