7
7
jobs :
8
8
build-deploy :
9
9
runs-on : ubuntu-latest
10
+ permissions :
11
+ contents : write
12
+ id-token : write
10
13
steps :
11
- - uses : actions/checkout@v3
12
- - uses : actions/setup-node@v3
13
- with :
14
- node-version : 16
15
- registry-url : ' https://registry.npmjs.org'
14
+ - uses : actions/checkout@v3
15
+ - uses : actions/setup-node@v3
16
+ with :
17
+ node-version : 18
18
+ registry-url : ' https://registry.npmjs.org'
16
19
17
- - run : npm install
18
- - run : npm run build
19
- - run : npm run doc
20
- - run : npm run coverage
21
- - run : cp -rp ./coverage www/build
20
+ - run : npm install
21
+ - run : npm run build
22
+ - run : npm run doc
23
+ - run : npm run coverage
24
+ - run : cp -rp ./coverage www/build
22
25
23
- - name : Create Tag
24
- id : create_tag
25
- uses : jaywcjlove/create-tag-action@main
26
- with :
27
- package-path : ./core/package.json
26
+ - name : Create Tag
27
+ id : create_tag
28
+ uses : jaywcjlove/create-tag-action@main
29
+ with :
30
+ package-path : ./core/package.json
28
31
29
- - name : Generate Contributors Images
30
- uses : jaywcjlove/github-action-contributors@main
31
- with :
32
- filter-author : (renovate\[bot\]|renovate-bot|dependabot\[bot\])
33
- output : www/build/CONTRIBUTORS.svg
34
- avatarSize : 42
32
+ - name : Generate Contributors Images
33
+ uses : jaywcjlove/github-action-contributors@main
34
+ with :
35
+ filter-author : (renovate\[bot\]|renovate-bot|dependabot\[bot\])
36
+ output : www/build/CONTRIBUTORS.svg
37
+ avatarSize : 42
35
38
36
- - name : Create Coverage Badges
37
- uses : jaywcjlove/coverage-badges-cli@main
38
- with :
39
- output : www/build/badges.svg
39
+ - name : Create Coverage Badges
40
+ uses : jaywcjlove/coverage-badges-cli@main
41
+ with :
42
+ output : www/build/badges.svg
40
43
41
- - name : Generate Changelog
42
- id : changelog
43
- uses : jaywcjlove/changelog-generator@main
44
- with :
45
- token : ${{ secrets.GITHUB_TOKEN }}
46
- head-ref : ${{steps.create_tag.outputs.version}}
47
- filter-author : (renovate-bot|Renovate Bot)
48
- filter : ' [R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
44
+ - name : Generate Changelog
45
+ id : changelog
46
+ uses : jaywcjlove/changelog-generator@main
47
+ with :
48
+ token : ${{ secrets.GITHUB_TOKEN }}
49
+ head-ref : ${{steps.create_tag.outputs.version}}
50
+ filter-author : (renovate-bot|Renovate Bot)
51
+ filter : ' [R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
49
52
50
- - name : Deploy
51
- uses : peaceiris/actions-gh-pages@v3
52
- with :
53
- github_token : ${{ secrets.GITHUB_TOKEN }}
54
- publish_dir : ./www/build
53
+ - name : Deploy
54
+ uses : peaceiris/actions-gh-pages@v3
55
+ with :
56
+ github_token : ${{ secrets.GITHUB_TOKEN }}
57
+ publish_dir : ./www/build
55
58
56
- - name : Create Release
57
- uses : ncipollo/release-action@v1
58
- if : steps.create_tag.outputs.successful
59
- with :
60
- name : ${{ steps.create_tag.outputs.version }}
61
- tag : ${{ steps.create_tag.outputs.version }}
62
- token : ${{ secrets.GITHUB_TOKEN }}
63
- body : |
64
- [](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-only-when@${{steps.changelog.outputs.version}}/file/README.md) [](https://coveralls.io/github/uiwjs/react-only-when?branch=main) [](https://www.npmjs.com/package/@uiw/react-only-when)
59
+ - name : Create Release
60
+ uses : ncipollo/release-action@v1
61
+ if : steps.create_tag.outputs.successful
62
+ with :
63
+ name : ${{ steps.create_tag.outputs.version }}
64
+ tag : ${{ steps.create_tag.outputs.version }}
65
+ token : ${{ secrets.GITHUB_TOKEN }}
66
+ body : |
67
+ [](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-only-when@${{steps.changelog.outputs.version}}/file/README.md) [](https://coveralls.io/github/uiwjs/react-only-when?branch=main) [](https://www.npmjs.com/package/@uiw/react-only-when)
65
68
66
- ```bash
67
- npm i @uiw/react-only-when@${{steps.changelog.outputs.version}}
68
- ```
69
- ${{ steps.changelog.outputs.compareurl }}
70
- ${{ steps.changelog.outputs.changelog }}
69
+ ```bash
70
+ npm i @uiw/react-only-when@${{steps.changelog.outputs.version}}
71
+ ```
72
+
73
+ ${{ steps.changelog.outputs.compareurl }}
74
+ ${{ steps.changelog.outputs.changelog }}
71
75
72
- - run : npm publish --access public
73
- name : 📦 @uiw/react-only-when publish to NPM
74
- continue-on-error : true
75
- working-directory : core
76
- env :
77
- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
76
+ - run : npm publish --access public --provenance
77
+ name : 📦 @uiw/react-only-when publish to NPM
78
+ continue-on-error : true
79
+ working-directory : core
80
+ env :
81
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments