File tree Expand file tree Collapse file tree 3 files changed +49
-4
lines changed Expand file tree Collapse file tree 3 files changed +49
-4
lines changed Original file line number Diff line number Diff line change 3
3
branches :
4
4
- main
5
5
pull_request : {}
6
+ workflow_call : {}
6
7
7
8
concurrency :
8
9
group : ' ${{ github.workflow }} - ${{ github.head_ref || github.ref }}'
31
32
node-version : ${{ matrix.node-version }}
32
33
- name : Setup LCOV
33
34
uses : hrishikesh-kadam/setup-lcov@v1
34
-
35
- - name : Enable Yarn
35
+ - name : Setup Yarn
36
36
run : corepack enable
37
37
38
38
- name : Install Packages
48
48
run : yarn coverage
49
49
50
50
- name : Report Coverage
51
- if : ${{ matrix.node-version == 20 }}
51
+ if : ${{ matrix.node-version == 20 && github.event_name == 'pull_request' }}
52
52
uses : zgosalvez/github-actions-report-lcov@v4
53
53
with :
54
54
coverage-files : coverage/lcov.info
Original file line number Diff line number Diff line change
1
+ on :
2
+ workflow_dispatch : {}
3
+ release :
4
+ types :
5
+ - published
6
+
7
+ jobs :
8
+ check :
9
+ uses : ./.github/workflows/ci.yml
10
+ secrets : inherit
11
+
12
+ publish :
13
+ needs : check
14
+
15
+ runs-on : ubuntu-latest
16
+
17
+ permissions :
18
+ contents : read
19
+ id-token : write
20
+
21
+ steps :
22
+ - name : Checkout
23
+ uses : actions/checkout@v4
24
+
25
+ - name : Setup Node.js
26
+ uses : actions/setup-node@v4
27
+ with :
28
+ node-version : lts/*
29
+ registry-url : ' https://registry.npmjs.com'
30
+ check-latest : true
31
+ - name : Setup Yarn
32
+ run : corepack enable
33
+
34
+ - name : Install Packages
35
+ run : yarn install
36
+
37
+ - name : Build
38
+ run : yarn build
39
+
40
+ - name : Publish
41
+ run : |
42
+ npm install -g npm@latest
43
+ npm publish --provenance
44
+ env :
45
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 47
47
"lint-docs" : " markdownlint-cli2 \" **/*.md\" \" #node_modules\" " ,
48
48
"lint-eslint-docs" : " yarn build && eslint-doc-generator --check" ,
49
49
"docs" : " eslint-doc-generator" ,
50
- "release" : " bumpp && yarn run build " ,
50
+ "release" : " bumpp && echo \" Create a new release in GitHub to trigger the publish workflow. \" " ,
51
51
"test" : " vitest" ,
52
52
"coverage" : " vitest run --coverage" ,
53
53
"typecheck" : " tsc --noEmit"
You can’t perform that action at this time.
0 commit comments