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 : 16
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+ steps :
33+ - uses : actions/checkout@v3
34+ - uses : actions/setup-node@v3
35+ with :
36+ node-version : 16
37+ registry-url : ' https://registry.npmjs.org'
38+
39+ - run : npm install --unsafe-perm
40+ # - run: npm run hoist
41+ - run : npm run build
42+ - run : npm run coverage
43+ - run : npm run bundle
44+ - run : npm run bundle:min
45+ - run : npm run doc
46+
47+ - name : Generate Contributors Images
48+ uses : jaywcjlove/github-action-contributors@main
49+ with :
50+ filter-author : (renovate\[bot\]|renovate-bot|dependabot\[bot\])
51+ output : website/build/CONTRIBUTORS.svg
52+ avatarSize : 42
53+
54+ - name : Create Coverage Badges
55+ uses : jaywcjlove/coverage-badges-cli@main
56+ with :
57+ output : website/build/badges.svg
58+
59+ - run : cp -rp coverage website/build
60+ - run : cp -rp core/dist/*js website/build
61+ - run : cp -rp core/dist/*css website/build
62+
63+ - name : Is a tag created auto?
64+ id : create_tag
65+ uses : jaywcjlove/create-tag-action@main
66+ with :
67+ token : ${{ secrets.GITHUB_TOKEN }}
68+ package-path : ./core/package.json
69+
70+ - name : get tag version
71+ id : tag_version
72+ uses : jaywcjlove/changelog-generator@main
73+
74+ - name : Deploy
75+ uses : peaceiris/actions-gh-pages@v3
76+ with :
77+ commit_message : ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
78+ github_token : ${{ secrets.GITHUB_TOKEN }}
79+ publish_dir : ./website/build
80+
81+ - name : Generate Changelog
82+ id : changelog
83+ uses : jaywcjlove/changelog-generator@main
84+ if : steps.create_tag.outputs.successful
85+ with :
86+ head-ref : ${{ steps.create_tag.outputs.version }}
87+ filter-author : (小弟调调™|Renovate Bot|renovate-bot)
88+ filter : ' [R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
89+
90+ - name : Create Release
91+ uses : ncipollo/release-action@v1
92+ if : steps.create_tag.outputs.successful
93+ with :
94+ token : ${{ secrets.GITHUB_TOKEN }}
95+ name : ${{ steps.changelog.outputs.tag }}
96+ tag : ${{ steps.changelog.outputs.tag }}
97+ body : |
98+ Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-monorepo-template/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
99+ Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
100+
101+ ${{ steps.changelog.outputs.changelog }}
102+
103+ # - run: git status
104+ # - run: npm install @jsdevtools/npm-publish -g
105+ # - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./core/package.json
106+
107+ # - name: 📦 @uiw/react-layout publish to NPM
108+ # uses: JS-DevTools/npm-publish@v1
109+ # with:
110+ # token: ${{ secrets.NPM_TOKEN }}
111+ # package: ./core/package.json
112+
113+ # - run: npm publish --access public
114+ # name: 📦 @uiw/react-monorepo-template to NPM
115+ # working-directory: core
116+ # continue-on-error: true
117+ # env:
118+ # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
119+
0 commit comments