From d8e5d9e71e4c757daf0d382bc1cf484e26b051d5 Mon Sep 17 00:00:00 2001 From: Toastconcern Date: Sat, 24 Oct 2026 16:50:31 -0500 Subject: [PATCH] ci: every push to main is also a numbered release v. (VERSION starts at 0.1), with release notes since the previous numbered release, marked as GitHub's latest release; only when no build failed, and a re-run leaves an existing one alone. The rolling "latest" pre-release stays: installed Studios and headsets update from it. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/build.yml | 23 +++++++++++++++++++++++ VERSION | 1 + docs/building.md | 7 +++++-- docs/getting-started.md | 3 ++- 4 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 VERSION diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4dad24b..5f04d89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -225,6 +225,19 @@ jobs: GH_TOKEN: ${{ github.token }} REPO: ${{ github.repository }} steps: + # Every push to main is also a numbered release: VERSION (major.minor) and the number of commits on main. + - name: Check out history (for the version number) + if: github.ref == 'refs/heads/main' + uses: actions/checkout@v4 + with: + path: src + fetch-depth: 0 + - name: Version + if: github.ref == 'refs/heads/main' + run: | + version="v$(tr -d ' \r\n' < src/VERSION).$(git -C src rev-list --count HEAD)" + echo "VERSION_TAG=$version" >> "$GITHUB_ENV" + echo "$version" - name: Download Studio build artifacts uses: actions/download-artifact@v4 with: @@ -304,6 +317,16 @@ jobs: - name: Version release (tag v*) if: ${{ startsWith(github.ref, 'refs/tags/v') && !contains(needs.*.result, 'failure') }} run: gh release create "${{ github.ref_name }}" dist/* --repo "$REPO" --title "Frame Studio ${{ github.ref_name }}" --generate-notes + # The numbered release (push to main): GitHub's "Latest release", with the changes since the previous numbered + # one. Only when no build failed; a re-run of the same commit finds it there and leaves it. + - name: Numbered release (push to main) + if: ${{ github.ref == 'refs/heads/main' && !contains(needs.*.result, 'failure') }} + run: | + if gh release view "$VERSION_TAG" --repo "$REPO" > /dev/null 2>&1; then echo "$VERSION_TAG is already released"; exit 0; fi + previous=$(gh release list --repo "$REPO" --exclude-pre-releases --limit 1 --json tagName --jq '.[0].tagName // empty') + gh release create "$VERSION_TAG" dist/* --repo "$REPO" --target "${{ github.sha }}" --latest \ + --title "Frame Studio $VERSION_TAG" --generate-notes ${previous:+--notes-start-tag "$previous"} + # The rolling "latest" pre-release: where installed Studios and headsets look for updates (latest.json). - name: Latest build (push to main) if: github.ref == 'refs/heads/main' run: | diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..49d5957 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.1 diff --git a/docs/building.md b/docs/building.md index 4354476..db6cd38 100644 --- a/docs/building.md +++ b/docs/building.md @@ -119,7 +119,7 @@ rolling `latest` release and one shared `v*` tag namespace; each release contain | When | What happens | |---|---| | Every push and pull request | Studio builds for Linux (x64, arm64), Windows (x64, arm64) and macOS (Apple Silicon); Frame Home is built on ARM64 and bundled into Studio packages. Successful outputs are kept as run artifacts. 32-bit and Intel Mac builds are local only (`scripts/build-studio.sh`). | -| A push to `main` | The **Latest build** pre-release is replaced with Studio builds and the standalone Frame Home installer. | +| A push to `main` | A numbered release, `v.` (for example `v0.1.51`), is published with the Studio builds and the Frame Home installer, with release notes for the changes since the previous one; it becomes GitHub's **Latest release**. It is only made when no build failed. The **Latest build** pre-release is replaced too: installed copies of Studio and Frame Home update from it. | | A tag starting with `v` (for example `v1.0`) | One version release is published with both Studio packages and the Frame Home installer. | | By hand | **Actions > build > Run workflow** | @@ -127,7 +127,10 @@ A newer push to the same branch cancels a run that is still going. Linux, macOS, and Frame Home jobs cache compiler outputs between runs; Windows/MSVC builds are not cached. Linux jobs also cache downloaded apt packages, and macOS caches Homebrew downloads; apt repository metadata is still refreshed each run. -To publish versions: +The first two parts of the number come from the `VERSION` file at the top of the repository (`0.1`). To start a new +major or minor version, change it (for example to `1.0`); the last part keeps counting commits. + +To publish a release by hand with a name of your own: ```sh git tag v1.0 diff --git a/docs/getting-started.md b/docs/getting-started.md index 1a4415a..0a037f0 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -43,7 +43,8 @@ see [install-frame-home.md](install-frame-home.md). 2. Pick a release: - **Latest build** is rebuilt from the newest code every time the main branch changes. It is marked as a pre-release. - - A **version release** (for example `v1.0`) is a fixed version. + - A **numbered release** (for example `v0.1.51`) is a fixed version. One is published for every change to the main + branch; the newest is marked **Latest** on the Releases page. 3. Download the file for your computer: | Computer | File |