Merge pull request #5 from theupriser/feature/iso-version-follows-steamify

feat(ci): the ISO's version follows Steamify, and master releases
This commit is contained in:
theupriser authored and GitHub committed 2026-09-29 20:51:44 +02:00
commit 1a55d5bb02
3 files changed
+34 -27

No files matched your search

+3
View File
@@ -11,6 +11,9 @@ concurrency:
jobs: jobs:
build: build:
# CachyOS's plain ISO and its quicktest matrix: only in CachyOS's own repo, not in this fork
# (the Steamify ISO is steamify-iso.yml).
if: github.repository == 'CachyOS/CachyOS-Live-ISO'
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: archlinux:base-devel image: archlinux:base-devel
+29 -26
View File
@@ -1,6 +1,8 @@
# The Steamify ISO, built and released on the Gitea mirror (git.upriser.nl) by its own runner: the same # The Steamify ISO, built and released on the Gitea mirror (git.upriser.nl) by its own runner: the same
# build as by hand (the wsl-build-host skill in steamify-cachyos-dev), then a Gitea release v<date> with the ISO, # build as by hand (the wsl-build-host skill in steamify-cachyos-dev), then a Gitea release with the ISO,
# its checksums and package list, notes from CHANGELOG.md's Steamify section. GitHub skips it (one file # its checksums and package list, notes from CHANGELOG.md's Steamify section. The ISO's version is the
# Steamify version on it plus the build date and time (UTC): master releases v<steamify>-<date>-<HHMM>,
# feat/steamify a pre-release v<steamify>-dev.<date>-<HHMM>. Never overwritten. GitHub skips it (one file
# for both servers; GitHub releases take at most 2 GB per file, the ISO is bigger). # for both servers; GitHub releases take at most 2 GB per file, the ISO is bigger).
# The runner needs privileged containers (archiso mounts loop devices) and ~20 GB of disk; Gitea's # The runner needs privileged containers (archiso mounts loop devices) and ~20 GB of disk; Gitea's
# [attachment] MAX_SIZE must allow the ISO (default 2 GB). # [attachment] MAX_SIZE must allow the ISO (default 2 GB).
@@ -8,7 +10,7 @@ name: Steamify ISO (Gitea release)
on: on:
push: push:
branches: [feat/steamify] branches: [master, feat/steamify]
workflow_dispatch: workflow_dispatch:
concurrency: concurrency:
@@ -47,48 +49,49 @@ jobs:
- name: Release name and notes - name: Release name and notes
id: rel id: rel
env:
TOKEN: ${{ github.token }}
run: | run: |
iso="$(ls out/desktop/*.iso | head -n 1)" iso="$(ls out/desktop/*.iso | head -n 1)"
[ -f "$iso" ] || { echo "::error::no ISO in out/desktop"; exit 1; } [ -f "$iso" ] || { echo "::error::no ISO in out/desktop"; exit 1; }
date="$(basename "$iso" | grep -oE '[0-9]{4}\.[0-9]{2}\.[0-9]{2}')" date="$(basename "$iso" | grep -oE '[0-9]{4}\.[0-9]{2}\.[0-9]{2}')"
steamify="$(sed -n 's/^VERSION=//p' archiso/airootfs/usr/local/share/steamify/steamify.sh | head -n 1)" steamify="$(sed -n 's/^VERSION=//p' archiso/airootfs/usr/local/share/steamify/steamify.sh | head -n 1)"
echo "tag=v$date" >> "$GITHUB_OUTPUT" [ -n "$steamify" ] || { echo "::error::no Steamify version on the ISO"; exit 1; }
echo "date=$date" >> "$GITHUB_OUTPUT" api="${{ github.server_url }}/api/v1/repos/${{ github.repository }}"
# The Steamify section of CHANGELOG.md ("## CachyOS with Steamify Live ISO ..."), without its heading. exists() { curl -fsS -o /dev/null -H "Authorization: token $TOKEN" "$api/releases/tags/$1"; }
section="$(awk '/^## CachyOS with Steamify Live ISO/ {found = 1; print; next} found && /^#/ {exit} found' CHANGELOG.md)" stamp="$date-$(date -u +%H%M)" # the ISO's date, the time of this run (UTC): every build its own name
title="$(head -n 1 <<< "$section" | sed 's/^## //')" if [ "${{ github.ref }}" = refs/heads/master ]; then
echo "title=$title" >> "$GITHUB_OUTPUT" tag="v$steamify-$stamp" prerelease=false name="CachyOS with Steamify Live ISO $steamify ($stamp UTC)"
else
tag="v$steamify-dev.$stamp" prerelease=true name="CachyOS with Steamify Live ISO $steamify (test build $stamp UTC)"
fi
# Never overwritten (a rerun in the same minute would find its tag taken).
if exists "$tag"; then
echo "::warning::$tag is already released and won't be overwritten."
echo "publish=false" >> "$GITHUB_OUTPUT"; exit 0
fi
{ echo "publish=true"; echo "tag=$tag"; echo "prerelease=$prerelease"; echo "name=$name"; } >> "$GITHUB_OUTPUT"
# 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)"
{ {
echo "Built $(date -u '+%F %H:%M UTC') from \`$(git rev-parse --short HEAD)\` (feat/steamify), with Steamify $steamify." echo "Built $(date -u '+%F %H:%M UTC') from \`$(git rev-parse --short HEAD)\` (${{ github.ref_name }}), with Steamify $steamify."
echo echo
echo "SHA-256: \`$(cut -d' ' -f1 "$iso.sha256")\`" echo "SHA-256: \`$(cut -d' ' -f1 "$iso.sha256")\`"
echo echo
tail -n +2 <<< "$section" echo "$section"
} > release-notes.md } > release-notes.md
cat release-notes.md cat release-notes.md
# One release per day: a rebuild on the same day replaces that day's release (and its tag).
- name: Replace today's release
env:
TOKEN: ${{ github.token }}
TAG: ${{ steps.rel.outputs.tag }}
run: |
api="${{ github.server_url }}/api/v1/repos/${{ github.repository }}"
if curl -fsS -H "Authorization: token $TOKEN" "$api/releases/tags/$TAG" -o /tmp/rel.json; then
curl -fsS -X DELETE -H "Authorization: token $TOKEN" "$api/releases/$(jq -r .id /tmp/rel.json)"
curl -fsS -X DELETE -H "Authorization: token $TOKEN" "$api/tags/$TAG" || true
echo "Replaced the release $TAG"
fi
- name: Publish ${{ steps.rel.outputs.tag }} - name: Publish ${{ steps.rel.outputs.tag }}
if: steps.rel.outputs.publish == 'true'
uses: akkuman/gitea-release-action@v1.3.7 uses: akkuman/gitea-release-action@v1.3.7
with: with:
token: ${{ github.token }} token: ${{ github.token }}
tag_name: ${{ steps.rel.outputs.tag }} tag_name: ${{ steps.rel.outputs.tag }}
target_commitish: ${{ github.sha }} target_commitish: ${{ github.sha }}
name: ${{ steps.rel.outputs.title }} (${{ steps.rel.outputs.date }}) name: ${{ steps.rel.outputs.name }}
body_path: release-notes.md body_path: release-notes.md
prerelease: true prerelease: ${{ steps.rel.outputs.prerelease }}
files: | files: |
out/desktop/*.iso out/desktop/*.iso
out/desktop/*.iso.sha256 out/desktop/*.iso.sha256
+2 -1
View File
@@ -26,8 +26,9 @@
* Correctly handle VM environments * Correctly handle VM environments
* Correctly quote pacman arguments * Correctly quote pacman arguments
## CachyOS with Steamify Live ISO 1.0.0 (unreleased) ## CachyOS with Steamify Live ISO
CachyOS 26.08 with Steamify built in: install CachyOS and turn the PC into a Steam Machine in one go. CachyOS 26.08 with Steamify built in: install CachyOS and turn the PC into a Steam Machine in one go.
Its version is the Steamify version on it plus the build date and time (a release on `master` is `v<Steamify version>-<date>-<HHMM UTC>`, e.g. `v2.9.1-2026.09.29-1432`).
**Features:** **Features:**