diff --git a/README.md b/README.md index c42c686f..1401c7c7 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,35 @@ The `zip` Gulp task packages the theme files into `dist/.zip`, which pnpm zip ``` +# Publishing a release + +Releases are shipped from an up-to-date, clean `main` branch in two steps. Before starting, configure `GST_TOKEN` with a GitHub token that can create releases in `TryGhost/Source`. + +First bump the version. This updates `package.json`, then creates a commit and annotated `v` git tag: + +```bash +# pick one of: patch | minor | major (or an explicit version, e.g. 1.8.0) +pnpm version minor +``` + +Then run `ship`: + +```bash +pnpm ship +``` + +`pnpm ship`: + +1. Builds the theme zip and runs GScan. +2. Refuses to continue if the working tree is not clean after the build. +3. Pushes the version commit and tag. +4. Prompts for the minimum compatible Ghost version and creates a draft GitHub release with the generated changelog. + +Review and publish the draft GitHub release after the command completes. The pushed theme tag, rather than the GitHub release, is what the next Ghost release uses when updating its bundled Source theme. + +> [!NOTE] +> `pnpm version` requires an explicit version or bump type. Run it before `pnpm ship`; the ship command does not perform the bump itself. + # PostCSS Features Used - Autoprefixer - Don't worry about writing browser prefixes of any kind, it's all done automatically with support for the latest 2 major versions of every browser. diff --git a/package.json b/package.json index 5709cf92..9134e87e 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "pretest": "pnpm zip", "pretest:ci": "pnpm zip", "preship": "pnpm test", - "ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then pnpm version && git push --follow-tags; else echo \"Uncommitted changes found.\" && exit 1; fi", + "ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then git push --follow-tags; else echo \"Uncommitted changes found.\" && exit 1; fi", "postship": "git fetch && gulp release" }, "packageManager": "pnpm@11.22.0",