diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4b8cbf0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,17 @@ +name: CI +on: + pull_request: + push: + branches: [main] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 + with: + node-version: 22 + package-manager-cache: false + - run: npm ci + - run: npm run typecheck + - run: npm test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..57d415c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +# Publishes to npm with Trusted Publishing (OIDC, no token stored), same setup as coderbuzz/codex. +# Trigger: push a tag vX.Y.Z that equals package.json "version". +# npmjs.com > @coderbuzz/dsh > Settings > Trusted Publisher: GitHub Actions, coderbuzz / dsh / release.yml, +# "Allow npm publish" checked. The package must exist first: version 0.1.0 is published once by hand. +name: Release +on: + push: + tags: ["v*"] +concurrency: + group: release + cancel-in-progress: false +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write # OIDC token npm exchanges for a short-lived publish credential + steps: + - uses: actions/checkout@v7 + # Trusted Publishing needs Node 22.14+ and npm 11.5.1+. + - uses: actions/setup-node@v7 + with: + node-version: latest + registry-url: https://registry.npmjs.org + package-manager-cache: false + - run: npm install -g npm@latest && npm --version + - name: Tag matches package.json version + run: | + v=$(node -p "require('./package.json').version") + [ "v$v" = "$GITHUB_REF_NAME" ] || { echo "::error::tag $GITHUB_REF_NAME != package.json version $v"; exit 1; } + - run: npm ci + # No NODE_AUTH_TOKEN: with none set, npm uses OIDC. prepublishOnly runs the tests. + - run: npm publish --access public diff --git a/README.md b/README.md index 767f819..2d0da2c 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,11 @@ Node OpenAI SDK passes through as a literal key and DeepSeek ignores; dsh patche a tool call, a resume, overrides, usage accounting, a stable message prefix, plan mode without bash, timeout killing child processes, parallel runs in one project, and telemetry staying off. +## Release + +Bump `version` in `package.json`, merge, then push tag `vX.Y.Z`: `.github/workflows/release.yml` tests and publishes +to npm with Trusted Publishing (OIDC, provenance, no token). + ## Upstream sync `scripts/sync-upstream.sh ` re-vendors `packages/core` and re-applies `vendor/patches/`. diff --git a/package.json b/package.json index 9d52dfc..d5ddc31 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,11 @@ "version": "0.1.0", "description": "DeepSeek harness for orchestrators: structured JSON SDK and CLI on top of the deepcode-cli engine", "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/coderbuzz/dsh.git" + }, + "homepage": "https://github.com/coderbuzz/dsh#readme", "type": "module", "bin": { "dsh": "./dist/cli.js"