diff --git a/.github/workflows/publish-repository-snapshot.yml b/.github/workflows/publish-repository-snapshot.yml index ceb67d3..841cc9e 100644 --- a/.github/workflows/publish-repository-snapshot.yml +++ b/.github/workflows/publish-repository-snapshot.yml @@ -96,8 +96,7 @@ jobs: --repo "$GITHUB_REPOSITORY" \ --target "$EXPECTED_SHA" \ --title "Fancy Kit repository snapshot $RELEASE_VERSION" \ - --notes-file "$RUNNER_TEMP/release-notes.md" \ - --latest=false + --notes-file "$RUNNER_TEMP/release-notes.md" release_url="$(gh release view "$TAG" \ --repo "$GITHUB_REPOSITORY" \ diff --git a/docs/releasing.md b/docs/releasing.md index d3e10f1..f3b8261 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -99,7 +99,7 @@ For a coordinated runtime-package release, stage both manifests and the root loc ## Repository snapshot releases -Repository snapshot releases mark reviewed, repository-wide milestones independently of every workspace package and Fancy Kit Harness version. They are normal GitHub Releases with tags in the form `fancy-kit-YYYY.MM.DD.N`, where the final positive integer distinguishes multiple snapshots on one date. They are not marked as the latest release, and they do not publish packages, build Harness assets, or imply that independently versioned components have changed. +Repository snapshot releases mark reviewed, repository-wide milestones independently of every workspace package and Fancy Kit Harness version. They are normal GitHub Releases with tags in the form `fancy-kit-YYYY.MM.DD.N`, where the final positive integer distinguishes multiple snapshots on one date. GitHub selects the newest normal release as the repository's Latest release; this is the intended repository-wide signal. Repository snapshots do not publish packages, build Harness assets, or imply that independently versioned components have changed. Dispatch `publish-repository-snapshot.yml` from an exact commit on `main`. The workflow validates a real calendar date, a full lowercase commit SHA, the selected Git ref, and an exact confirmation before creating the tag and release. Dispatch publishes the release immediately after verification, so treat starting the workflow as approval to publish the selected repository state and to notify any external services connected to GitHub Releases. @@ -155,7 +155,7 @@ npm run release:prepare:harness Inspect `dist/fancy-kit-harness/SOURCE.json` and require `includesUncommittedChanges` to be `false`. Verify all entries in `SHA256SUMS`. The generated `INSTALLER.md` contains the exact HTTPS link for the release body; its query identifies the Harness version and Screwdriver-document SHA-256, but never a Vault name. -Create the `harness-` release at the exact source commit. Attach at least the versioned Screwdriver document, `SOURCE.json`, and `SHA256SUMS`; the individual plug-in files may also be attached for inspection. Include the generated installer link in the release body. Attach all assets before publishing when possible. +Create the `harness-` release as a GitHub prerelease at the exact source commit. This keeps the repository snapshot as the Latest normal release. Attach at least the versioned Screwdriver document, `SOURCE.json`, and `SHA256SUMS`; the individual plug-in files may also be attached for inspection. Include the generated installer link in the release body. Attach all assets before publishing when possible. Publishing or editing the release triggers the Pages workflow. It copies every published Harness Screwdriver asset into a versioned same-origin path and deploys the installer. Wait for the **Deploy Harness installer** workflow, then open the release link and verify the complete Clipboard, Obsidian URI, Screwdriver restore, plug-in enablement, and selected review flow on the intended device. If the release was published before its asset was attached, add the asset and rerun the Pages workflow manually. diff --git a/package.json b/package.json index 9e5bac2..a0b2c25 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "check:e2e": "tsc -p test/e2e-obsidian/tsconfig.json", "check:all": "npm run check && npm run check:harness && npm run check:e2e", "check:octagonal-wheels": "npm run check --workspace octagonal-wheels", - "check:release-tools": "node --test scripts/assert-bootstrap-publish.test.mjs scripts/harness-installer.test.mjs scripts/prepare-harness-release.test.mjs scripts/prepare-release.test.mjs scripts/validate-release-selection.test.mjs scripts/validate-repository-release-selection.test.mjs", + "check:release-tools": "node --test scripts/assert-bootstrap-publish.test.mjs scripts/harness-installer.test.mjs scripts/prepare-harness-release.test.mjs scripts/prepare-release.test.mjs scripts/publish-repository-snapshot-workflow.test.mjs scripts/validate-release-selection.test.mjs scripts/validate-repository-release-selection.test.mjs", "check:workspace": "npm run check:all && npm run check:octagonal-wheels && npm run check:release-tools", "dev:harness": "node apps/obsidian-harness/esbuild.config.mjs", "harness:open": "npm run build:harness && tsx test/e2e-obsidian/scripts/debug-ui.ts", diff --git a/scripts/publish-repository-snapshot-workflow.test.mjs b/scripts/publish-repository-snapshot-workflow.test.mjs new file mode 100644 index 0000000..2972afd --- /dev/null +++ b/scripts/publish-repository-snapshot-workflow.test.mjs @@ -0,0 +1,14 @@ +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import test from "node:test"; + +const workflow = readFileSync( + new URL("../.github/workflows/publish-repository-snapshot.yml", import.meta.url), + "utf8", +); + +test("allows GitHub to select the latest normal repository snapshot", () => { + assert.match(workflow, /gh release create/); + assert.doesNotMatch(workflow, /--latest=false/); + assert.doesNotMatch(workflow, /--prerelease/); +});