Skip to content

Commit 566d37f

Browse files
committed
update npm&github auth22
1 parent 57b2aa7 commit 566d37f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,39 @@ jobs:
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:

0 commit comments

Comments
 (0)