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
45 changes: 43 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,67 @@ name: Publish to NPM

on:
push:
branches:
- main
tags:
- 'v*'
workflow_dispatch:

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

jobs:
publish:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
permissions:
contents: read
contents: write
id-token: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: actions/setup-node@v6
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
package-manager-cache: false

- name: Decide whether to publish
id: plan
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"

if npm view "n8n-nodes-browserbase@${VERSION}" version >/dev/null 2>&1; then
echo "publish=false" >> "$GITHUB_OUTPUT"
echo "n8n-nodes-browserbase@${VERSION} is already on npm"
else
echo "publish=true" >> "$GITHUB_OUTPUT"
fi

if [ "${GITHUB_REF}" = "refs/heads/main" ] && ! git rev-parse "refs/tags/v${VERSION}" >/dev/null 2>&1; then
echo "github_release=true" >> "$GITHUB_OUTPUT"
else
echo "github_release=false" >> "$GITHUB_OUTPUT"
fi

- run: npm ci
if: steps.plan.outputs.publish == 'true'

- run: npm run build
if: steps.plan.outputs.publish == 'true'

- run: npm publish --provenance --access public
if: steps.plan.outputs.publish == 'true'

- name: Create GitHub release
if: steps.plan.outputs.github_release == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "v${{ steps.plan.outputs.version }}" \
--target "${GITHUB_SHA}" \
--title "v${{ steps.plan.outputs.version }}" \
--generate-notes
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ Optional fields:
| Field | Description |
| --- | --- |
| `Number of Results` | How many results to return, from 1 to 25 |
| `Provider` | Optional search provider: `parallel` or `exa`. Omit to use the project default. |
| `Mode` | Optional Parallel mode: `fast` or `advanced`. Only sent when Provider is Parallel. |

Search output includes:

Expand All @@ -80,15 +82,21 @@ Required fields:
| Field | Description |
| --- | --- |
| `URL` | URL to fetch |
| `Format` | `raw` (default), `markdown`, or `json`. Markdown and JSON are Fetch Extract. |

`JSON` format also requires a JSON Schema. The extracted object comes back in `content`.

Optional fetch settings:

- Follow redirects
- Allow insecure SSL
- Use Browserbase proxies
- Proxy country, state, and city (`proxies` is sent as a geolocation object when a country is set)

Fetch output includes:

- `id`
- `format`
- `statusCode`
- `headers`
- `content`
Expand Down
Loading
Loading