-
Notifications
You must be signed in to change notification settings - Fork 17
42 lines (35 loc) · 1.14 KB
/
Copy pathnpm-publish.yml
File metadata and controls
42 lines (35 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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