File tree Expand file tree Collapse file tree 3 files changed +107
-2
lines changed Expand file tree Collapse file tree 3 files changed +107
-2
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
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@v4
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@v4
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 4040 "@ksmithut/prettier-standard" : " latest" ,
4141 "ava" : " latest" ,
4242 "c8" : " latest" ,
43+ "ci-publish" : " latest" ,
4344 "finepack" : " latest" ,
4445 "git-authors-cli" : " latest" ,
4546 "github-generate-release" : " latest" ,
4647 "nano-staged" : " latest" ,
4748 "npm-check-updates" : " latest" ,
48- "pretty-ms" : " 7" ,
4949 "simple-git-hooks" : " latest" ,
5050 "standard" : " latest" ,
5151 "standard-markdown" : " latest" ,
6363 "contributors" : " (npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true" ,
6464 "coverage" : " c8 report --reporter=text-lcov > coverage/lcov.info" ,
6565 "lint" : " standard-markdown README.md && standard" ,
66- "postrelease" : " npm run release:tags && npm run release:github && npm publish" ,
66+ "postrelease" : " npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public) " ,
6767 "prerelease" : " npm run update:check" ,
6868 "pretest" : " npm run lint" ,
6969 "release" : " standard-version -a" ,
You can’t perform that action at this time.
0 commit comments