1
+ name : CI
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+
7
+ jobs :
8
+ build-deploy :
9
+ runs-on : ubuntu-latest
10
+ 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'
16
+
17
+ - run : npm install
18
+ - run : npm run build
19
+ - run : npm run doc
20
+
21
+ - name : Generate Contributors Images
22
+ uses : jaywcjlove/github-action-contributors@main
23
+ with :
24
+ filter-author : (renovate\[bot\]|renovate-bot|dependabot\[bot\])
25
+ output : www/build/CONTRIBUTORS.svg
26
+ avatarSize : 42
27
+
28
+ - name : Create Tag
29
+ id : create_tag
30
+ uses : jaywcjlove/create-tag-action@main
31
+ with :
32
+ token : ${{ secrets.GITHUB_TOKEN }}
33
+ package-path : ./core/package.json
34
+
35
+ - name : get tag version
36
+ id : tag_version
37
+ uses : jaywcjlove/changelog-generator@main
38
+
39
+ - name : Deploy
40
+ uses : peaceiris/actions-gh-pages@v3
41
+ with :
42
+ commit_message : ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
43
+ github_token : ${{ secrets.GITHUB_TOKEN }}
44
+ publish_dir : ./www/build
45
+
46
+ - name : Generate Changelog
47
+ id : changelog
48
+ uses : jaywcjlove/changelog-generator@main
49
+ with :
50
+ head-ref : ${{steps.create_tag.outputs.version}}
51
+ filter : ' [R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
52
+
53
+ - name : Create Release
54
+ uses : ncipollo/release-action@v1
55
+ if : steps.create_tag.outputs.successful
56
+ with :
57
+ token : ${{ secrets.GITHUB_TOKEN }}
58
+ name : ${{ steps.create_tag.outputs.version }}
59
+ tag : ${{ steps.create_tag.outputs.version }}
60
+ body : |
61
+ [](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-json-view@${{steps.create_tag.outputs.versionNumber}}/file/README.md)
62
+
63
+ Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-json-view/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
64
+ Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
65
+
66
+ ```bash
67
+ npm i @uiw/react-json-view@${{steps.create_tag.outputs.versionNumber}}
68
+ ```
69
+
70
+ ${{ steps.changelog.outputs.changelog }}
71
+
72
+ - run : npm publish --access public
73
+ name : 📦 @uiw/react-json-view publish to NPM
74
+ continue-on-error : true
75
+ env :
76
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments