File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 ref : ${{ github.ref_name }}
1818
1919 - name : Setup pnpm
20- uses : pnpm/action-setup@v2
20+ uses : pnpm/action-setup@v4
21+ with :
22+ version : 9
2123
2224 - name : Setup Node
2325 uses : actions/setup-node@v3
@@ -39,14 +41,19 @@ jobs:
3941 ${{ runner.os }}-pnpm-store-
4042 - name : Install dependencies
4143 run : pnpm i --no-frozen-lockfile
42- - name : Build
44+ - name : Bump version
4345 run : |
44- pnpm build
46+ # pnpm 自带 npm 版本管理
47+ pnpm version ${{ steps.ver.outputs.value }} --no-git-tag-version
48+ # 显示确认
49+ cat package.json | jq .version
50+ - name : Build
51+ run : pnpm build
4552 - name : Upload build artifact
4653 uses : actions/upload-artifact@v4
4754 with :
4855 name : dist-artifact
49- path : dist /
56+ path : . /
5057 # Publish job
5158 publish :
5259 needs : build
5663 uses : actions/download-artifact@v4
5764 with :
5865 name : dist-artifact
59- path : dist /
66+ path : . /
6067 - name : Parse Publish tag
6168 id : parse_tag
6269 run : |
7582 VERSION="$(node -p "require('./package.json').version")"
7683 echo "publish version: $VERSION"
7784 echo "publish tag: ${{ steps.parse_tag.outputs.dist_tag }}"
78- - name : Publish @opentiny/fluent-editor
85+ - name : Publish @opentiny/tiny-toolkit-pro
7986 run : |
8087 echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
8188 npm publish --tag ${{ steps.parse_tag.outputs.dist_tag }}
Original file line number Diff line number Diff line change 4040 # 步骤2: 设置pnpm包管理器
4141 - name : Setup pnpm
4242 uses : pnpm/action-setup@v4
43+ with :
44+ version : 9
4345
4446 # 步骤3: 设置Node.js环境
4547 - name : Setup Node
@@ -78,14 +80,19 @@ jobs:
7880 fi
7981 echo "version: $VERSION"
8082 echo "value=$VERSION" >> $GITHUB_OUTPUT
81-
82- - name : Build lib
83+ - name : Bump version
84+ run : |
85+ # pnpm 自带 npm 版本管理
86+ pnpm version ${{ steps.ver.outputs.value }} --no-git-tag-version
87+ # 显示确认
88+ cat package.json | jq .version
89+ - name : Build
8390 run : pnpm build
8491 - name : Upload build artifact
8592 uses : actions/upload-artifact@v4
8693 with :
8794 name : dist-artifact
88- path : dist /
95+ path : . /
8996 # Publish job
9097 publish :
9198 needs : build
@@ -95,14 +102,14 @@ jobs:
95102 uses : actions/download-artifact@v4
96103 with :
97104 name : dist-artifact
98- path : dist /
105+ path : . /
99106 - name : Show version and tag
100107 run : |
101108 echo "publish version: ${{ needs.build.outputs.version }}"
102109 echo "publish tag: ${{ inputs.tag }}"
103110
104111 # 步骤8: 发布组件到NPM
105- - name : Publish @opentiny/fluent-editor
112+ - name : Publish @opentiny/tiny-toolkit-pro
106113 run : |
107114 echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
108115 npm publish --tag ${{ inputs.tag }}
Original file line number Diff line number Diff line change 5555 "doc:html" : " typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs" ,
5656 "doc:json" : " typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json" ,
5757 "doc:publish" : " gh-pages -m \" [ci skip] Updates\" -d build/docs" ,
58- "clean" : " trash build test" ,
59- "prepublishOnly" : " run-s fix build"
58+ "clean" : " trash build test"
6059 },
6160 "scripts-info" : {
6261 "info" : " Display information about the package scripts" ,
You can’t perform that action at this time.
0 commit comments