mirror of
https://github.com/theupriser/steamify-cachyos-live-iso.git
synced 2026-10-02 15:10:26 +02:00
Merge pull request #21 from theupriser/feature/iso-release-notes
Sync git.upriser.nl mirror / sync (push) Skipped
Sync git.upriser.nl mirror / sync (push) Skipped
Feature/iso release notes
This commit is contained in:
3 files changed
+14
-7
No files matched your search
@@ -55,14 +55,15 @@ jobs:
|
|||||||
[ -n "$steamify" ] || { echo "::error::no VERSION in steamify.sh at $sref"; exit 1; }
|
[ -n "$steamify" ] || { echo "::error::no VERSION in steamify.sh at $sref"; exit 1; }
|
||||||
fi
|
fi
|
||||||
stamp="$(date -u +%y%m%d)" day="$(date -u +%Y.%m.%d)"
|
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 }}"
|
kind="${{ inputs.kind }}"
|
||||||
if [ -z "$kind" ] || [ "$kind" = auto ]; then
|
if [ -z "$kind" ] || [ "$kind" = auto ]; then
|
||||||
if [ "${{ github.ref }}" = refs/heads/master ]; then kind=release; else kind=dev; fi
|
if [ "${{ github.ref }}" = refs/heads/master ]; then kind=release; else kind=dev; fi
|
||||||
fi
|
fi
|
||||||
if [ "$kind" = release ]; then
|
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
|
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
|
fi
|
||||||
# The ISO's file on the mirror is named after the tag (iso-2-gitea-build.yml, profiledef.sh), so its
|
# 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.
|
# 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 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),
|
# - 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.
|
# - 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 |
|
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')"
|
awk -v v="$steamify" 'index($0, "## " v " ") == 1 {f = 1; next} f && /^## / {exit} f')"
|
||||||
[ "$kind" = release ] && want_pre=false || want_pre=true
|
[ "$kind" = release ] && want_pre=false || want_pre=true
|
||||||
|
|||||||
@@ -159,10 +159,11 @@ jobs:
|
|||||||
[ -f "$iso" ] || { echo "::error::no ISO in out/desktop"; exit 1; }
|
[ -f "$iso" ] || { echo "::error::no ISO in out/desktop"; exit 1; }
|
||||||
tag="${{ github.ref_name }}" b="$STEAMIFY_BUILD_STAMP"
|
tag="${{ github.ref_name }}" b="$STEAMIFY_BUILD_STAMP"
|
||||||
stamp="20${b:0:2}.${b:2:2}.${b:4:2}"
|
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
|
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
|
else
|
||||||
name="CachyOS with Steamify Live ISO $STEAMIFY_VERSION ($stamp UTC)"
|
name="CachyOS $base with Steamify $STEAMIFY_VERSION ($stamp UTC)"
|
||||||
fi
|
fi
|
||||||
# One ISO per day and kind: a release of this tag from an earlier build of the day is replaced.
|
# 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 }}"
|
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 }}"
|
run="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||||
api="https://api.github.com/repos/theupriser/steamify-cachyos-live-iso/releases"
|
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; }
|
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
|
import json, os, re
|
||||||
d = json.load(open("/tmp/rel.json"))
|
d = json.load(open("/tmp/rel.json"))
|
||||||
badge = f"[]({os.environ['RUN']})"
|
|
||||||
body = d.get("body") or ""
|
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"[]({run})"
|
||||||
pat = re.compile(r"\[?!\[ISO build\]\([^)]*\)(\]\([^)]*\))?")
|
pat = re.compile(r"\[?!\[ISO build\]\([^)]*\)(\]\([^)]*\))?")
|
||||||
body = pat.sub(lambda m: badge, body, count=1) if pat.search(body) else badge + "\n\n" + body
|
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"))
|
json.dump({"body": body}, open("/tmp/patch.json", "w"))
|
||||||
|
|||||||
@@ -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
|
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
|
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.
|
"## 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).
|
||||||
Reference in new issue
Block a user