File tree Expand file tree Collapse file tree 3 files changed +108
-1
lines changed Expand file tree Collapse file tree 3 files changed +108
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : main
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+
8
+ jobs :
9
+ contributors :
10
+ if : " ${{ github.event.head_commit.message != 'build: contributors' }}"
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout
14
+ uses : actions/checkout@v4
15
+ with :
16
+ fetch-depth : 0
17
+ token : ${{ secrets.GITHUB_TOKEN }}
18
+ - name : Setup Node.js
19
+ uses : actions/setup-node@v4
20
+ with :
21
+ node-version : lts/*
22
+ - name : Contributors
10000
23
+ run : |
24
+ git config --global user.email ${{ secrets.GIT_EMAIL }}
25
+ git config --global user.name ${{ secrets.GIT_USERNAME }}
26
+ npm run contributors
27
+ - name : Push changes
28
+ run : |
29
+ git push origin ${{ github.head_ref }}
30
+
31
+ release :
32
+ if : |
33
+ !startsWith(github.event.head_commit.message, 'chore(release):') &&
34
+ !startsWith(github.event.head_commit.message, 'docs:') &&
35
+ !startsWith(github.event.head_commit.message, 'ci:')
36
+ needs : [contributors]
37
+ runs-on : ubuntu-latest
38
+ steps :
39
+ - name : Checkout
40
+ uses : actions/checkout@v4
41
+ with :
42
+ fetch-depth : 2
43
+ token : ${{ secrets.GITHUB_TOKEN }}
44
+ - name : Setup Node.js
45
+ uses : actions/setup-node@v4
46
+ with :
47
+ node-version : lts/*
48
+ - name : Setup PNPM
49
+ uses : pnpm/action-setup@v2
50
+ with :
51
+ version : latest
52
+ run_install : true
53
+ - name : Test
54
+ run : pnpm test
55
+ # - name: Report
56
+ # run: npx c8 report --reporter=text-lcov > coverage/lcov.info
57
+ # - name: Coverage
58
+ # uses: coverallsapp/github-action@main
59
+ # with:
60
+ # github-token: ${{ secrets.GITHUB_TOKEN }}
61
+ - name : Release
62
+ env :
63
+ GH_TOKEN : ${{ secrets.GH_TOKEN }}
64
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
65
+ run : |
66
+ git config --global user.email ${{ secrets.GIT_EMAIL }}
67
+ git config --global user.name ${{ secrets.GIT_USERNAME }}
68
+ git pull origin master
69
+ pnpm run release
Original file line number Diff line number Diff line change
1
+ name : pull_request
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ pull_request :
8
+ branches :
9
+ - master
10
+
11
+ jobs :
12
+ test :
13
+ if : github.ref != 'refs/heads/master'
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Checkout
17
+ uses : actions/checkout@v4
18
+ with :
19
+ token : ${{ secrets.GITHUB_TOKEN }}
20
+ - name : Setup Node.js
21
+ uses : actions/setup-node@v4
22
+ with :
23
+ node-version : lts/*
24
+ - name : Setup PNPM
25
+ uses : pnpm/action-setup@v2
26
+ with :
27
+ version : latest
28
+ run_install : true
29
+ - name : Test
30
+ run : pnpm test
31
+ # - name: Report
32
+ # run: npx c8 report --reporter=text-lcov > coverage/lcov.info
33
+ # - name: Coverage
34
+ # uses: coverallsapp/github-action@main
35
+ # with:
36
+ # github-token: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 35
35
"@commitlint/cli" : " latest" ,
36
36
"@commitlint/config-conventional" : " latest" ,
37
37
"@ksmithut/prettier-standard" : " latest" ,
38
+ "ci-publish" : " latest" ,
38
39
"finepack" : " latest" ,
39
40
"git-authors-cli" : " latest" ,
40
41
"github-generate-release" : " latest" ,
41
42
"nano-staged" : " latest" ,
42
43
"npm-check-updates" : " latest" ,
43
44
"simple-git-hooks" : " latest" ,
44
45
"standard" : " latest" ,
46
+ "standard-markdown" : " latest" ,
45
47
"standard-version" : " latest"
46
48
},
47
49
"engines" : {
56
58
"contributors" : " (npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true" ,
57
59
"coverage" : " c8 report --reporter=text-lcov > coverage/lcov.info" ,
58
60
"lint" : " standard" ,
59
- "postrelease" : " npm run release:tags && npm run release:github && npm publish" ,
61
+ "postrelease" : " npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public) " ,
60
62
"prerelease" : " npm run update:check" ,
61
63
"pretest" : " npm run lint" ,
62
64
"release" : " standard-version -a" ,
You can’t perform that action at this time.
0 commit comments