Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Publish to npm

on:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: npm-publish
cancel-in-progress: false

jobs:
publish:
if: >-
github.repository == 'browserbase/sdk-functions-node' &&
github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: npm-publish
permissions:
contents: read
id-token: write

steps:
- name: Checkout release commit
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24.x"
registry-url: https://registry.npmjs.org

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.12.1

- name: Setup npm for trusted publishing
run: npm install --global npm@11

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint and typecheck
run: pnpm run lint

- name: Run unit tests
run: pnpm run test

- name: Build SDK
run: pnpm run build

- name: Run integration tests
run: pnpm run test:integration

- name: Inspect package contents
run: npm publish --dry-run

- name: Publish to npm
run: npm publish --access public --tag latest
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,9 @@
"dotenv": "^17.2.3",
"tsx": "^4.20.5",
"zod": "^4.1.5"
},
"repository": {
"type": "git",
"url": "git+https://github.com/browserbase/sdk-functions-node.git"
}
}
Loading