File tree Expand file tree Collapse file tree 4 files changed +21
-14
lines changed Expand file tree Collapse file tree 4 files changed +21
-14
lines changed Original file line number Diff line number Diff line change 4
4
"commit" : false ,
5
5
"fixed" : [],
6
6
"linked" : [],
7
- "access" : " restricted " ,
7
+ "access" : " public " ,
8
8
"baseBranch" : " main" ,
9
9
"updateInternalDependencies" : " patch" ,
10
10
"ignore" : [" @vite-plugin-checker/runtime" , " @playground/*" ]
Original file line number Diff line number Diff line change @@ -2,8 +2,11 @@ name: Release
2
2
3
3
on :
4
4
push :
5
- tags :
6
- - ' vite-plugin-checker@*'
5
+ branches :
6
+ - main
7
+
8
+ env :
9
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
7
10
8
11
jobs :
9
12
release :
@@ -23,25 +26,25 @@ jobs:
23
26
cache : pnpm
24
27
registry-url : ' https://registry.npmjs.org'
25
28
26
- - run : npx changelogithub
27
- continue-on-error : true
28
- env :
29
- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
30
-
31
29
- name : Install Dependencies
32
30
run : pnpm i
33
31
34
- - name : PNPM build
32
+ - name : Prepare for Release
35
33
run : |
36
34
pnpm run format
37
35
pnpm run lint
38
36
pnpm run type-check
39
37
pnpm run clean
40
38
pnpm run build
41
39
pnpm run publint
42
- cp README.md packages/vite-plugin-checker/README.md
43
40
44
- - name : Publish to NPM
45
- run : pnpm publish --filter vite-plugin-checker --no-git-checks
41
+ - name : Create Release Pull Request or Publish to npm
42
+ id : changesets
43
+ uses : changesets/action@v1
44
+ with :
45
+ title : ' chore: next release'
46
+ publish : pnpm release
47
+ commit : ' release: publish'
46
48
env :
47
- NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
49
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change
1
+ # https://github.com/changesets/action/issues/98#issuecomment-917292485
2
+ //registry.npmjs.org/:_authToken = ${ NPM_TOKEN }
3
+
1
4
registry = https://registry.npmjs.org/
2
5
hoist = false
Original file line number Diff line number Diff line change 51
51
"type-check" : " pnpm -r --parallel --filter \" vite-plugin-checker\" exec tsc --noEmit" ,
52
52
"docs:dev" : " pnpm --filter docs exec vitepress dev ." ,
53
53
"docs:build" : " pnpm --filter docs exec vitepress build ." ,
54
- "docs:serve" : " pnpm --filter docs exec vitepress serve ."
54
+ "docs:serve" : " pnpm --filter docs exec vitepress serve ." ,
55
+ "release" : " cp README.md packages/vite-plugin-checker/README.md && changeset publish && git push --follow-tags"
55
56
},
56
57
"simple-git-hooks" : {
57
58
"pre-commit" : " pnpm exec lint-staged"
You can’t perform that action at this time.
0 commit comments