feat(boxlite): use official node sdk locally #31
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: ["v*"] | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org | |
| - run: npm install -g npm@latest | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm --filter @sandbank.dev/core build | |
| - run: pnpm build | |
| - name: Resolve workspace references | |
| run: | | |
| node -e " | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const pkgs = fs.readdirSync('packages'); | |
| // Build version map: @sandbank.dev/X -> actual version | |
| const versions = {}; | |
| for (const p of pkgs) { | |
| const pj = JSON.parse(fs.readFileSync(path.join('packages', p, 'package.json'), 'utf8')); | |
| versions[pj.name] = pj.version; | |
| } | |
| // Replace workspace:* with actual versions in each package | |
| for (const p of pkgs) { | |
| const pjPath = path.join('packages', p, 'package.json'); | |
| const pj = JSON.parse(fs.readFileSync(pjPath, 'utf8')); | |
| let changed = false; | |
| for (const depType of ['dependencies', 'devDependencies', 'peerDependencies']) { | |
| const deps = pj[depType]; | |
| if (!deps) continue; | |
| for (const [name, ver] of Object.entries(deps)) { | |
| if (ver === 'workspace:*' && versions[name]) { | |
| deps[name] = '^' + versions[name]; | |
| changed = true; | |
| } | |
| } | |
| } | |
| if (changed) fs.writeFileSync(pjPath, JSON.stringify(pj, null, 2) + '\n'); | |
| } | |
| console.log('Resolved:', Object.entries(versions).map(([n,v]) => n+'@'+v).join(', ')); | |
| " | |
| - name: Verify no workspace protocol leaks | |
| run: | | |
| if grep -Hn '"workspace:' packages/*/package.json; then | |
| echo "::error::Unresolved 'workspace:' protocol found in package.json above — the resolve step missed them. Aborting publish." | |
| exit 1 | |
| fi | |
| echo "All workspace references resolved; safe to publish." | |
| # Layer 1: no internal deps | |
| - name: Publish @sandbank.dev/core | |
| run: npm publish --provenance --access public || true | |
| working-directory: packages/core | |
| - name: Publish @sandbank.dev/relay | |
| run: npm publish --provenance --access public || true | |
| working-directory: packages/relay | |
| # Layer 2: depend on core | |
| - name: Publish @sandbank.dev/agent | |
| run: npm publish --provenance --access public || true | |
| working-directory: packages/agent | |
| - name: Publish @sandbank.dev/skills | |
| run: npm publish --provenance --access public || true | |
| working-directory: packages/skills | |
| - name: Publish @sandbank.dev/daytona | |
| run: npm publish --provenance --access public || true | |
| working-directory: packages/daytona | |
| - name: Publish @sandbank.dev/flyio | |
| run: npm publish --provenance --access public || true | |
| working-directory: packages/flyio | |
| - name: Publish @sandbank.dev/cloud | |
| run: npm publish --provenance --access public || true | |
| working-directory: packages/cloud | |
| - name: Publish @sandbank.dev/cloudflare | |
| run: npm publish --provenance --access public || true | |
| working-directory: packages/cloudflare | |
| - name: Publish @sandbank.dev/boxlite | |
| run: npm publish --provenance --access public || true | |
| working-directory: packages/boxlite | |
| - name: Publish @sandbank.dev/db9 | |
| run: npm publish --provenance --access public || true | |
| working-directory: packages/db9 | |
| # Layer 3: main package | |
| - name: Publish sandbank | |
| run: npm publish --provenance --access public || true | |
| working-directory: packages/sandbank | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true |