Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 98 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:
permissions:
contents: write
pull-requests: write
statuses: write

concurrency:
group: release-${{ github.event_name }}-${{ github.ref_name }}
Expand All @@ -36,6 +37,7 @@ jobs:
runs-on: macos-15
outputs:
branch: ${{ steps.version.outputs.branch }}
sha: ${{ steps.release_commit.outputs.sha }}
env:
GH_TOKEN: ${{ github.token }}

Expand Down Expand Up @@ -185,6 +187,7 @@ jobs:
mv "${tmp}" CHANGELOG.md

- name: Commit and push release changes
id: release_commit
shell: bash
run: |
set -euo pipefail
Expand All @@ -195,6 +198,7 @@ jobs:
printf '%s\n' "${version}" > VERSION
git add VERSION CHANGELOG.md
git commit -m "chore(release): ${version}" -m "- bump VERSION to ${version}" -m "- update CHANGELOG.md"
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
git push --force-with-lease --set-upstream origin "${branch}"

- name: Open release pull request
Expand Down Expand Up @@ -234,40 +238,129 @@ jobs:
printf 'Merge that pull request into main to trigger the publish job.\n'
} >> "$GITHUB_STEP_SUMMARY"

# GITHUB_TOKEN pushes don't trigger other workflows, so the required
# checks ("Run tests", "Lint commit messages") would stay pending on the
# release PR. These jobs run the same checks inline with matching names
# so branch protection on main is satisfied.
release-tests:
needs: prepare
if: github.event_name == 'workflow_dispatch'
name: Run tests
runs-on: macos-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Check out release branch
uses: actions/checkout@v5
with:
ref: ${{ needs.prepare.outputs.branch }}

- name: Run tests
id: tests
shell: bash
run: ./tests.sh

- name: Publish test status
if: always()
shell: bash
run: |
set -euo pipefail

state="success"
description="Test suite passed"
if [[ "${{ steps.tests.outcome }}" != "success" ]]; then
state="failure"
description="Test suite failed"
fi

gh api \
--method POST \
"repos/${GITHUB_REPOSITORY}/statuses/${{ needs.prepare.outputs.sha }}" \
-f state="${state}" \
-f context='Run tests' \
-f description="${description}" \
-f target_url="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"

release-lint:
needs: prepare
if: github.event_name == 'workflow_dispatch'
name: Lint commit messages
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Check out release branch
uses: actions/checkout@v5
with:
ref: ${{ needs.prepare.outputs.branch }}
fetch-depth: 0

- name: Lint commits
- name: Lint release commit
id: lint
uses: wagoid/commitlint-github-action@v6
with:
configFile: .commitlintrc.json
commitDepth: 1

- name: Publish lint status
if: always()
shell: bash
run: |
set -euo pipefail

state="success"
description="Commit messages passed"
if [[ "${{ steps.lint.outcome }}" != "success" ]]; then
state="failure"
description="Commit message lint failed"
fi

gh api \
--method POST \
"repos/${GITHUB_REPOSITORY}/statuses/${{ needs.prepare.outputs.sha }}" \
-f state="${state}" \
-f context='Lint commit messages' \
-f description="${description}" \
-f target_url="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"

release-branch-policy:
needs: prepare
if: github.event_name == 'workflow_dispatch'
name: Check source branch
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Validate release source branch
id: branch_policy
shell: bash
run: |
set -euo pipefail

branch="${{ needs.prepare.outputs.branch }}"
echo "Source branch: ${branch}"

if [[ "${branch}" != release/v* ]]; then
echo "Expected release/v* branch, got ${branch}." >&2
exit 1
fi

- name: Publish branch policy status
if: always()
shell: bash
run: |
set -euo pipefail

state="success"
description="Release branch allowed"
if [[ "${{ steps.branch_policy.outcome }}" != "success" ]]; then
state="failure"
description="Release branch policy failed"
fi

gh api \
--method POST \
"repos/${GITHUB_REPOSITORY}/statuses/${{ needs.prepare.outputs.sha }}" \
-f state="${state}" \
-f context='Check source branch' \
-f description="${description}" \
-f target_url="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"

publish:
if: github.event_name == 'push'
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.2.0] - 2026-06-10

### Features

- multi-screen sync coordinator (#85)
- add two darker brightness steps to rain palette (#71)
- group options sheet into sections (#69)

### Bug Fixes

- publish release PR required checks (#95)
- dispatch release checks on release branch (#93)
- exit number rain loop when scene completes (#89)
- recreate release PR instead of reusing (#88)
- run required checks inline in release workflow (#87)
- trigger checks on release branch push (#86)
- restrict release workflow dispatch to development branch (#83)
- always regenerate changelog on release reruns (#82)
- allow release workflow dispatch from development branch (#81)
- source release changelog from development branch (#80)
- derive current version from latest git tag in release workflow (#74)
- auto-merge back-merge PR and sync VERSION after release (#73)
- apply typing speed to all intro scenes (#70)

## [0.1.1] - 2026-05-20

### Features
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.1
0.2.0