From 38ac8f1cbac16a43f3ce5406e55ccaa0602749d8 Mon Sep 17 00:00:00 2001 From: Rick Peters Date: Wed, 30 Sep 2026 11:32:25 +0200 Subject: [PATCH] feat(ci): iso-1-github-tag.yml takes the kind of build (release, dev, auto) so it always runs from master --- .github/workflows/iso-1-github-tag.yml | 19 +++++++++++++++---- AGENTS.md | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/iso-1-github-tag.yml b/.github/workflows/iso-1-github-tag.yml index 616dd73..53b53b9 100644 --- a/.github/workflows/iso-1-github-tag.yml +++ b/.github/workflows/iso-1-github-tag.yml @@ -4,13 +4,20 @@ # GitHub releases take at most 2 GB per file, the ISO is bigger, and a release on the mirror only survives its # syncs when its tag comes from here. # Name: the Steamify version the ISO gets (its newest release) plus the time (UTC, GitHub's clock when the release starts): -# master releases v--, feat/steamify a pre-release v-dev.<...>. +# kind release: v--, a real release; kind dev: a pre-release v-dev.<...>. name: ISO 1/2 ยท Tag and release (GitHub) -# Started by a new Steamify release (its bundle.yml, secret ISO_DISPATCH_TOKEN) or by hand (Run workflow, -# on master for a release, on feat/steamify for a test build); not by every push. +# Always run from master. Started by steamify-cachyos (its bundle.yml, secret ISO_DISPATCH_TOKEN), which says what to +# build: a version published from main -> kind release, a version on a release branch -> kind dev. Or by hand (Run +# workflow); `auto` is a release on master and a dev build on any other branch. Not started by pushes. on: workflow_dispatch: + inputs: + kind: + description: "release (a real ISO), dev (a pre-release test build) or auto (release on master, dev elsewhere)" + type: choice + options: [auto, release, dev] + default: auto permissions: contents: write @@ -33,7 +40,11 @@ jobs: steamify="$(gh release view -R theupriser/steamify-cachyos --json tagName -q .tagName)" steamify="${steamify#v}" stamp="$(date -u +%Y.%m.%d-%H%M)" - if [ "${{ github.ref }}" = refs/heads/master ]; then + 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 ($stamp UTC)" else tag="v$steamify-dev.$stamp" pre="--prerelease" name="CachyOS with Steamify Live ISO $steamify (test build $stamp UTC)" diff --git a/AGENTS.md b/AGENTS.md index 3f11d4c..2b390e9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -117,7 +117,7 @@ Full write-up, with every trap: `steamify-iso-release` in steamify-cachyos-dev. - `.github/workflows/iso-1-github-tag.yml` (GitHub, `workflow_dispatch` only: by hand, or started by a new Steamify release, whose `bundle.yml` needs the secret `ISO_DISPATCH_TOKEN`) names the release: the Steamify version plus GitHub's UTC time, `vX.Y.Z-[dev.]YYYY.MM.DD-HHMM`, an **annotated** tag and a release with notes and the direct - download link. `feat/steamify` makes a `dev.` pre-release, `master` a real one. + download link. The workflow always runs from `master`; its input `kind` (`release`, `dev`, or `auto`: release on master, dev on other branches) decides: `release` is a real release, `dev` a `dev.` pre-release. steamify-cachyos' bundle.yml passes it: a version published from main -> `release`, a version on a release branch -> `dev`. - `.github/workflows/iso-2-gitea-build.yml` (Gitea, `on: push: tags: v*`, skipped on GitHub) runs two jobs for that tag: build the ISO, then attach it to the mirror's release. It is not tested there (the runner is small): the VM tests run on GitHub, in steamify-cachyos `vmtest.yml`, on the newest ISO release of the mirror. The tag decides everything: Steamify version (`steamify-prepare.sh`