Skip to content

Commit 4403393

Browse files
committed
chore: update workflows config.
1 parent 452e194 commit 4403393

File tree

1 file changed

+59
-1
lines changed

1 file changed

+59
-1
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,66 @@ jobs:
1818
- run: npm run build
1919
- run: npm run doc
2020

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: ./website/build/CONTRIBUTORS.svg
26+
avatarSize: 42
27+
28+
- name: Create Tag
29+
id: create_tag
30+
uses: jaywcjlove/create-tag-action@v1.3.6
31+
with:
32+
package-path: ./core/package.json
33+
34+
- name: get tag version
35+
id: tag_version
36+
uses: jaywcjlove/changelog-generator@v1.5.3
37+
38+
- name: Deploy Website
39+
uses: peaceiris/actions-gh-pages@v3
40+
with:
41+
user_name: 'github-actions[bot]'
42+
user_email: 'github-actions[bot]@users.noreply.github.com'
43+
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
publish_dir: ./website/build
46+
47+
- name: Generate Changelog
48+
id: changelog
49+
uses: jaywcjlove/changelog-generator@v1.5.3
50+
with:
51+
token: ${{ secrets.GITHUB_TOKEN }}
52+
filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot)
53+
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
54+
55+
- name: Create Release
56+
uses: ncipollo/release-action@v1
57+
if: steps.create_tag.outputs.successful
58+
with:
59+
token: ${{ secrets.GITHUB_TOKEN }}
60+
name: ${{ steps.create_tag.outputs.version }}
61+
tag: ${{ steps.create_tag.outputs.version }}
62+
body: |
63+
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/markdown-react-code-preview-loader@${{steps.changelog.outputs.version}}/file/README.md) [![npm version](https://img.shields.io/npm/v/markdown-react-code-preview-loader.svg)](https://www.npmjs.com/package/markdown-react-code-preview-loader)
64+
65+
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/kktjs/markdown-react-code-preview-loader/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
66+
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
67+
68+
```bash
69+
npm i markdown-react-code-preview-loader@${{steps.changelog.outputs.version}}
70+
```
71+
72+
${{ steps.changelog.outputs.changelog }}
73+
2174
- name: Deploy
2275
uses: peaceiris/actions-gh-pages@v3
2376
with:
2477
github_token: ${{ secrets.GITHUB_TOKEN }}
25-
publish_dir: ./website/build
78+
publish_dir: ./website/build
79+
80+
- uses: JS-DevTools/npm-publish@v1
81+
with:
82+
token: ${{ secrets.NPM_TOKEN }}
83+
package: ./core/package.json

0 commit comments

Comments
 (0)