1+ name : CI
2+ on :
3+ push :
4+ branches :
5+ - main
6+
7+ # env:
8+ # SKIP_PREFLIGHT_CHECK: true
9+ jobs :
10+ windows :
11+ runs-on : windows-latest
12+ steps :
13+ - uses : actions/checkout@v3
14+ - uses : actions/setup-node@v3
15+ with :
16+ node-version : 18
17+
18+ - name : Look Changelog
19+ uses : jaywcjlove/changelog-generator@main
20+ with :
21+ filter-author : (小弟调调™|Renovate Bot|renovate-bot)
22+ filter : ' [R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
23+
24+ - run : npm install --unsafe-perm
25+ # - run: npm run hoist
26+ - run : npm run build
27+ - run : npm run coverage
28+ - run : npm run doc
29+
30+ build :
31+ runs-on : ubuntu-latest
32+ permissions :
33+ contents : write
34+ id-token : write
35+ steps :
36+ - uses : actions/checkout@v3
37+ - uses : actions/setup-node@v3
38+ with :
39+ node-version : 18
40+ registry-url : ' https://registry.npmjs.org'
41+
42+ - run : npm install --unsafe-perm
43+ # - run: npm run hoist
44+ - run : npm run build
45+ - run : npm run coverage
46+ - run : npm run bundle
47+ - run : npm run bundle:min
48+ - run : npm run doc
49+
50+ - name : Generate Contributors Images
51+ uses : jaywcjlove/github-action-contributors@main
52+ with :
53+ filter-author : (renovate\[bot\]|renovate-bot|dependabot\[bot\])
54+ output : website/build/CONTRIBUTORS.svg
55+ avatarSize : 42
56+
57+ - name : Create Coverage Badges
58+ uses : jaywcjlove/coverage-badges-cli@main
59+ with :
60+ output : website/build/badges.svg
61+
62+ - run : cp -rp coverage website/build
63+ - run : cp -rp core/dist/*js website/build
64+ - run : cp -rp core/dist/*css website/build
65+
66+ - name : Is a tag created auto?
67+ id : create_tag
68+ uses : jaywcjlove/create-tag-action@main
69+ with :
70+ token : ${{ secrets.GITHUB_TOKEN }}
71+ package-path : ./core/package.json
72+
73+ - name : get tag version
74+ id : tag_version
75+ uses : jaywcjlove/changelog-generator@main
76+
77+ - name : Deploy
78+ uses : peaceiris/actions-gh-pages@v3
79+ with :
80+ commit_message : ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
81+ github_token : ${{ secrets.GITHUB_TOKEN }}
82+ publish_dir : ./website/build
83+
84+ - name : Generate Changelog
85+ id : changelog
86+ uses : jaywcjlove/changelog-generator@main
87+ if : steps.create_tag.outputs.successful
88+ with :
89+ head-ref : ${{ steps.create_tag.outputs.version }}
90+ filter-author : (小弟调调™|Renovate Bot|renovate-bot)
91+ filter : ' [R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
92+
93+ - name : Create Release
94+ uses : ncipollo/release-action@v1
95+ if : steps.create_tag.outputs.successful
96+ with :
97+ token : ${{ secrets.GITHUB_TOKEN }}
98+ name : ${{ steps.changelog.outputs.tag }}
99+ tag : ${{ steps.changelog.outputs.tag }}
100+ body : |
101+ Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-monorepo-template/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
102+ Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
103+
104+ ${{ steps.changelog.outputs.changelog }}
105+
106+ # - run: npm publish --access public --provenance
107+ # name: 📦 @uiw/react-monorepo-template to NPM
108+ # working-directory: core
109+ # continue-on-error: true
110+ # env:
111+ # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
112+
0 commit comments