File tree Expand file tree Collapse file tree 5 files changed +12162
-0
lines changed
Expand file tree Collapse file tree 5 files changed +12162
-0
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,22 @@ name: CI build
22
33on :
44 push :
5+ branches :
6+ - main
57 pull_request :
68 schedule :
79 - cron : ' 0 0 * * 0'
810
911jobs :
12+ lint-commits :
13+ runs-on : ubuntu-latest
14+ if : ${{ github.event_name == 'pull_request' }}
15+ steps :
16+ - uses : actions/checkout@v2
17+ with :
18+ fetch-depth : 0
19+ - uses : wagoid/commitlint-github-action@v2
20+
1021 lint-code :
1122 runs-on : ubuntu-latest
1223
6273 uses : codecov/codecov-action@v1
6374 with :
6475 token : ${{ secrets.CODECOV_TOKEN }}
76+
77+ release :
78+ runs-on : ubuntu-latest
79+ if : ${{ github.ref == 'refs/heads/main' }}
80+ needs :
81+ - lint-code
82+ - lint-readme
83+ - test
84+ steps :
85+ - name : Checkout
86+ uses : actions/checkout@v2
87+ with :
88+ fetch-depth : 0
89+ - name : Setup Node.js
90+ uses : actions/setup-node@v1
91+ with :
92+ node-version : 16
93+ - name : Cache Node packages
94+ uses : actions/cache@v2
95+ with :
96+ path : node_modules
97+ key : release-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
98+ - name : Install dependencies
99+ run : npm ci
100+ - name : Release
101+ env :
102+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
103+ run : npx semantic-release
Original file line number Diff line number Diff line change 88/.coverage
99/.python-version
1010/.mypy_cache
11+ node_modules /
Original file line number Diff line number Diff line change 1+ {
2+ "branches" : [" main" ],
3+ "plugins" : [
4+ [
5+ " @semantic-release/commit-analyzer" ,
6+ {
7+ "preset" : " conventionalcommits"
8+ }
9+ ],
10+ [
11+ " @semantic-release/release-notes-generator" ,
12+ {
13+ "preset" : " angular"
14+ }
15+ ],
16+ [
17+ " @google/semantic-release-replace-plugin" ,
18+ {
19+ "replacements" : [
20+ {
21+ "files" : [" setup.py" ],
22+ "from" : " version=\" .*\" " ,
23+ "to" : " version=\" ${nextRelease.version}\" " ,
24+ "results" : [
25+ {
26+ "file" : " setup.py" ,
27+ "hasChanged" : true ,
28+ "numMatches" : 1 ,
29+ "numReplacements" : 1
30+ }
31+ ],
32+ "countMatches" : true
33+ }
34+ ]
35+ }
36+ ],
37+ [
38+ " @semantic-release/git" ,
39+ {
40+ "assets" : [" setup.py" ]
41+ }
42+ ],
43+ " @semantic-release/github"
44+ ]
45+ }
You can’t perform that action at this time.
0 commit comments