From 7b1b5d0f6cae8008c04593d48ee48c8539c5318f Mon Sep 17 00:00:00 2001 From: Ethan J Lewis Date: Tue, 12 May 2026 20:52:35 -0500 Subject: [PATCH] chore: add build number and release scripts --- README.md | 16 ++++++++++++++++ package.json | 3 +++ src/pages/index.astro | 4 ++++ 3 files changed, 23 insertions(+) diff --git a/README.md b/README.md index c186ff7..28e582f 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,22 @@ npm run dev # local dev server npm run build # type-check + production build ``` +## Releases + +The footer build number comes from Woodpecker's pipeline number and increments on each CI build. +The package version is an intentional release label. + +Use one of these from a clean worktree when you are ready to cut a release: + +```sh +npm run release:patch # fixes, typo corrections, small polish +npm run release:minor # meaningful playable additions or mechanics +npm run release:major # disruptive changes after 1.0.0 +git push --follow-tags +``` + +Each release script updates `package.json` and `package-lock.json`, creates a release commit, and tags it. + ## Layout - `src/engine/` — parser, dispatcher, encounter logic diff --git a/package.json b/package.json index cdc75a3..b6d770a 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,9 @@ "build": "astro check && astro build", "preview": "astro preview", "astro": "astro", + "release:patch": "npm version patch -m \"chore(release): %s\"", + "release:minor": "npm version minor -m \"chore(release): %s\"", + "release:major": "npm version major -m \"chore(release): %s\"", "test": "vitest run", "test:watch": "vitest" }, diff --git a/src/pages/index.astro b/src/pages/index.astro index b15d57f..84d9469 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,5 +1,7 @@ --- import '../ui/crt.css' + +const buildNumber = process.env.CI_PIPELINE_NUMBER ?? 'local' --- @@ -80,6 +82,8 @@ import '../ui/crt.css' GNU 3.0 + Build #{buildNumber} + Source Code