Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

ci(release): a proven tag publishes by hand; GitHub CI is a second opinion [C7,I15]

Corey Olson1694efbcc4cd
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 90d753d6..a871a727 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -7,6 +7,13 @@ name: release
on:
push:
tags: ['v*']
+ # The person, 27 Oct: GitHub CI is a second opinion. When it finds something, that becomes an item; it does not
+ # hold a release the board already proved. A tag whose Linux jobs failed publishes by hand through publish-proven.
+ workflow_dispatch:
+ inputs:
+ tag:
+ description: 'An existing tag vX.Y.Z on main, already proven by the board'
+ required: true
permissions:
contents: read
@@ -19,6 +26,7 @@ jobs:
contents: write
actions: read
id-token: write
+ if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -93,3 +101,42 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: gh release create "$GITHUB_REF_NAME" --verify-tag --title "$GITHUB_REF_NAME" --notes-file "$RUNNER_TEMP/release-notes.md"
+
+ # Run by hand for a proven tag: the same version and notes checks as above, without the GitHub CI gate.
+ publish-proven:
+ permissions:
+ contents: write
+ id-token: write
+ if: github.event_name == 'workflow_dispatch'
+ runs-on: ubuntu-latest
+ env:
+ TAG: ${{ inputs.tag }}
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ ref: refs/tags/${{ inputs.tag }}
+ fetch-depth: 0
+ - uses: actions/setup-node@v4
+ with:
+ node-version: '24'
+ registry-url: 'https://registry.npmjs.org'
+ - name: The tag names package.json's version and its commit is on main
+ run: |
+ set -euo pipefail
+ [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "::error::$TAG is not a vX.Y.Z tag; refusing npm publish."; exit 1; }
+ test "v$(node -p "require('./package.json').version")" = "$TAG"
+ git fetch -q origin main
+ git merge-base --is-ancestor "$(git rev-parse "refs/tags/$TAG^{commit}")" origin/main \
+ || { echo "::error::$TAG is not on main; refusing npm publish."; exit 1; }
+ - name: Release notes from the tagged changelog section, with the tag's own extraction step
+ run: |
+ set -euo pipefail
+ awk "/<<'NOTES'\$/{f=1;next} f&&/^ *NOTES\$/{exit} f" .github/workflows/release.yml | sed 's/^ \{10\}//' > "$RUNNER_TEMP/notes.mjs"
+ GITHUB_REF_NAME="$TAG" node "$RUNNER_TEMP/notes.mjs"
+ - name: npm new enough for trusted publishing
+ run: npm install -g npm@latest
+ - run: npm publish --provenance --access public
+ - name: Publish the GitHub release with its changelog notes
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: gh release create "$TAG" --verify-tag --title "$TAG" --notes-file "$RUNNER_TEMP/release-notes.md"
diff --git a/test/ci.test.js b/test/ci.test.js
index 32bbf909..cb399a83 100644
--- a/test/ci.test.js
+++ b/test/ci.test.js
@@ -117,3 +117,27 @@ test("the README header shows the board's own badges, not the CI status badge [C
assert.doesNotMatch(header, /actions\/workflows\/gate\.yml/u, 'the header carries no CI status badge');
for (const badge of ['pullboard', 'npm']) assert.match(header, new RegExp(`alt="${badge}(?:: [^"]+)?"`, 'u'), `the header shows the ${badge} badge`);
});
+
+test('a proven tag publishes by hand without the GitHub CI gate, with the tag job\'s own notes [C7,I15]', (t) => {
+ const start = RELEASE.indexOf('\n publish-proven:\n');
+ assert.ok(start > RELEASE.indexOf('id: main-ci'), 'the tag job keeps its CI gate and comes first');
+ const proven = RELEASE.slice(start);
+ assert.match(RELEASE, /\n {2}workflow_dispatch:\n {4}inputs:\n {6}tag:\n/u, 'a person names the tag to publish');
+ assert.match(proven, /\n {4}if: github\.event_name == 'workflow_dispatch'\n/u, 'only a manual run takes this path');
+ assert.match(RELEASE, /\n {4}if: github\.event_name == 'push'\n {4}runs-on/u, 'a tag push still takes the CI-gated path');
+ assert.doesNotMatch(proven, /gh run (?:list|view)/u, 'GitHub CI is a second opinion here, not a gate');
+ assert.match(proven, /git merge-base --is-ancestor [^\n]*origin\/main/u, 'only a commit on main publishes');
+ assert.ok(proven.includes('test "v$(node -p "require(\'./package.json\').version")" = "$TAG"'), 'the tag must match the package version');
+ assert.ok(proven.indexOf("<<'NOTES'") < proven.indexOf('run: npm publish --provenance --access public'), 'notes are extracted before publishing');
+ const awk = proven.match(/awk "([^\n]*)" \.github\/workflows\/release\.yml/u);
+ assert.ok(awk, 'the manual path reuses the tag job\'s notes script');
+ const directory = mkdtempSync(join(tmpdir(), 'pullboard-release-proven-'));
+ t.after(() => rmSync(directory, { recursive: true, force: true }));
+ writeFileSync(join(directory, 'CHANGELOG.md'), '# Changelog\n\n## [1.2.3] - 2026-10-27\n\n### Fixed\n\n- One line.\n');
+ writeFileSync(join(directory, 'release.yml'), RELEASE);
+ const extracted = runFixtureChild('sh', ['-c', `awk "${awk[1].replaceAll('"', '\\"')}" release.yml | sed 's/^ \\{10\\}//' > notes.mjs && GITHUB_REF_NAME=v1.2.3 "${process.execPath}" notes.mjs`], {
+ cwd: directory, encoding: 'utf8', env: { ...process.env, RUNNER_TEMP: directory },
+ });
+ assert.equal(extracted.status, 0, extracted.stderr);
+ assert.equal(readFileSync(join(directory, 'release-notes.md'), 'utf8'), '\n### Fixed\n\n- One line.\n', 'the same section the tag job would publish');
+});