diff --git a/.github/workflows/latest-release.yml b/.github/workflows/latest-release.yml new file mode 100644 index 0000000..902c0cb --- /dev/null +++ b/.github/workflows/latest-release.yml @@ -0,0 +1,29 @@ +# When a release becomes GitHub's Latest release: the release-notes footer, the site's version text and the README +# lines marked are updated, checked and committed. Pre-releases change nothing. +# The shared workflow and its script live in timbermods/.github. Run it by hand for a dry run (changes nothing). +name: Latest release + +on: + release: + types: [released] + workflow_dispatch: + inputs: + dry-run: + description: Show what would change, change nothing + type: boolean + default: true + +permissions: + contents: write + issues: write + pages: write + +jobs: + update: + uses: timbermods/.github/.github/workflows/latest-release.yml@main + with: + site-url: https://timbermods.github.io/PersistentWorkAreas/ + install-page: 'install.html' + asset-pattern: '^PersistentWorkAreas-v[\d.]+\.zip$' + test-command: '' + dry-run: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run }} diff --git a/CLAUDE.md b/CLAUDE.md index cd1e67d..2bd545d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -14,7 +14,7 @@ in `source/`, game assets and localization in `packaging/PersistentWorkAreas/ver ## Standing rules - Never launch or drive Timberborn, and never touch installed mods or saves. The maintainer (Kyler) playtests himself. -- Commit on a branch and open a PR. Merge only when Kyler says so in the chat. +- Commit on a branch and open a PR. Kyler has said to merge PRs automatically: merge, then check the page live. - Assume fresh games: no old-save compatibility notes. Player-facing text never says which version added what. - Sources of truth for facts: `README.md`, `VALIDATION.md`, the localization CSV (`packaging/PersistentWorkAreas/version-1.1/Localizations/enUS_PersistentWorkAreas.csv`), the release notes. Where @@ -27,6 +27,11 @@ in `source/`, game assets and localization in `packaging/PersistentWorkAreas/ver HTML/CSS/JS, no build step. Live at https://timbermods.github.io/PersistentWorkAreas/. - **Published:** GitHub Pages serves `main:/docs` (legacy build), so merging to main publishes; a build takes about a minute. No deploy script, no `gh-pages` branch. +- **Latest releases update themselves:** when a release becomes GitHub's Latest, `.github/workflows/latest-release.yml` + (the shared timbermods workflow) appends the standard footer to its notes, sets the site's + `data-release="version|tag|asset-name"` fallback text and the README lines ending in `` to the new + version, runs the site checks and commits to main. Pre-releases change nothing. Descriptions, status lists and FAQs + stay manual (the checklist below). Dry run: Actions → Latest release → Run workflow. - **Look:** "The Tracing Overlay". A drafting table: warm plan paper with a surveyed grid, and every block of reading taped onto it as a translucent vellum sheet, the way a pinned outline stays on tracing paper while you work below. The look is fixed: updates extend it and never restyle it. diff --git a/README.md b/README.md index cb884d5..7978ccb 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ When updating, replace the whole `PersistentWorkAreas` folder. The new DLL reads ## Install 1. Close Timberborn. -2. Download `PersistentWorkAreas-v1.1.0.zip` from **Assets** on the [latest release](https://github.com/timbermods/PersistentWorkAreas/releases/latest). Don't use the `-source.zip` or the **Source code** archives. +2. Download `PersistentWorkAreas-v1.1.0.zip` from **Assets** on the [latest release](https://github.com/timbermods/PersistentWorkAreas/releases/latest). Don't use the `-source.zip` or the **Source code** archives. 3. Extract it into your Timberborn `Mods` folder (normally `Documents\Timberborn\Mods`). The result should be `Mods\PersistentWorkAreas\version-1.1\manifest.json` with `PersistentWorkAreas.dll` beside it. 4. Start Timberborn and enable **Persistent Work Areas** in the mod manager. Restart if prompted. @@ -76,7 +76,7 @@ Install the .NET 8 SDK and have Timberborn installed, then run: .\build.ps1 -GameDir 'C:\Program Files (x86)\Steam\steamapps\common\Timberborn' ``` -The script builds the mod, runs checks, and creates `dist\PersistentWorkAreas-v1.1.0.zip`. No game, Unity, Harmony, or BeaverBuddies DLLs are redistributed. The game DLLs are used only as build references. +The script builds the mod, runs checks, and creates `dist\PersistentWorkAreas-v1.1.0.zip`. No game, Unity, Harmony, or BeaverBuddies DLLs are redistributed. The game DLLs are used only as build references. Without the game, `dotnet run --project tests/Checks.csproj -c Release` runs only the checks that need no game files (pin, refresh-planning, planting-tool and pin-file logic) and reports the rest as skipped. GitHub Actions runs them for pull requests and pushes to `main`.