File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 3333 echo "🔖 Detected stable release, using npm tag: latest"
3434 echo "npm_tag=latest" >> $GITHUB_OUTPUT
3535 fi
36+ publish_spec_only :
37+ runs-on : ubuntu-latest
38+ steps :
39+ - uses : actions/checkout@v4
40+
41+ - uses : actions/setup-node@v4
42+ with :
43+ node-version : 20
44+ registry-url : https://registry.npmjs.org/
45+
46+ - name : Show Node & npm version
47+ run : |
48+ node -v
49+ npm -v
50+
51+ - name : Debug env
52+ run : |
53+ echo "NPM_TOKEN=${NPM_TOKEN:-<empty>}"
54+ echo "NODE_AUTH_TOKEN=${NODE_AUTH_TOKEN:-<empty>}"
55+ env | grep -i npm || echo "no npm-related env vars"
56+
57+ - name : Install deps & build
58+ working-directory : specification
59+ run : |
60+ npm install
61+ npm run build --if-present
62+
63+ - name : Set version and publish
64+ working-directory : specification
65+ run : |
66+ VERSION=$(node -p "require('./package.json').version")
67+ echo "Version in package.json: $VERSION"
68+ npm publish --access public
3669
3770 # 2. 发布 specification
3871 publish_spec :
You can’t perform that action at this time.
0 commit comments