Skip to content

feat: add cli action runner #16

feat: add cli action runner

feat: add cli action runner #16

Workflow file for this run

name: npm 发布
on:
push:
tags:
- "v*"
permissions:
contents: read
id-token: write
jobs:
publish-npm-cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.0.0
with:
go-version-file: go.mod
cache: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0
with:
node-version: "24"
registry-url: https://registry.npmjs.org
package-manager-cache: false
- name: Use npm with trusted publishing support
run: npm install -g npm@11.14.0
- name: Publish CLI package to npm
working-directory: packages/open-browser-use-cli
run: |
version="$(node -p 'require("./package.json").version')"
if npm view "open-browser-use@${version}" version >/dev/null 2>&1; then
echo "open-browser-use@${version} already exists on npm; skipping publish"
exit 0
fi
npm publish