diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b89dac9..6fd0a9d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,7 @@ on: permissions: contents: write id-token: write + packages: write jobs: release: @@ -36,11 +37,24 @@ jobs: - name: Test run: npm test - - name: Publish to npm (trusted publishing via OIDC) + - name: Publish to npm run: npm publish --provenance --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Configure GitHub Packages registry + uses: actions/setup-node@v4 + with: + node-version: 22 + registry-url: https://npm.pkg.github.com/ + + - name: Publish to GitHub Packages + run: | + npm pkg set "name=@that-github-user/thinktank-ai" + npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: diff --git a/.gitignore b/.gitignore index 811705e..8067465 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,8 @@ node_modules/ dist/ .thinktank/ *.tgz + +__pycache__/ +*.pyc +examples/*/package-lock.json +scripts/batch-runs*.sh diff --git a/src/commands/run.test.ts b/src/commands/run.test.ts index c8ffd72..5006de2 100644 --- a/src/commands/run.test.ts +++ b/src/commands/run.test.ts @@ -465,6 +465,10 @@ describe("preflightTestRun", () => { it("returns warning when command is not found", async () => { const result = await preflightTestRun("nonexistent-command-xyz", process.cwd()); assert.ok(result); - assert.ok(result.includes("failed on the current branch")); + // Exit 127 (command not found) gets a specific message + assert.ok( + result.includes("Test command not found") || result.includes("failed on the current branch"), + `Expected exit-127 or generic failure message, got: ${result.substring(0, 100)}`, + ); }); });