Skip to content

Commit 690d881

Browse files
committed
chore: update workflows config.
1 parent ee25665 commit 690d881

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

.github/workflows/ci.yml

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22

33
on:
44
push:
5-
branch:
5+
branches:
66
- main
77

88
jobs:
@@ -29,8 +29,53 @@ jobs:
2929
output: ./website/build/CONTRIBUTORS.svg
3030
avatarSize: 42
3131

32+
- name: Create Tag
33+
id: create_tag
34+
uses: jaywcjlove/[email protected]
35+
with:
36+
package-path: ./core/package.json
37+
38+
- name: get tag version
39+
id: tag_version
40+
uses: jaywcjlove/[email protected]
41+
3242
- name: Deploy Website
3343
uses: peaceiris/actions-gh-pages@v3
3444
with:
45+
user_name: 'github-actions[bot]'
46+
user_email: 'github-actions[bot]@users.noreply.github.com'
47+
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
3548
github_token: ${{ secrets.GITHUB_TOKEN }}
36-
publish_dir: ./website/build
49+
publish_dir: ./website/build
50+
51+
- name: Generate Changelog
52+
id: changelog
53+
uses: jaywcjlove/[email protected]
54+
with:
55+
token: ${{ secrets.GITHUB_TOKEN }}
56+
filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot)
57+
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
58+
59+
- name: Create Release
60+
uses: ncipollo/release-action@v1
61+
if: steps.create_tag.outputs.successful
62+
with:
63+
token: ${{ secrets.GITHUB_TOKEN }}
64+
name: ${{ steps.create_tag.outputs.version }}
65+
tag: ${{ steps.create_tag.outputs.version }}
66+
body: |
67+
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/react-code-preview-layout@${{steps.changelog.outputs.version}}/file/README.md) [![npm version](https://img.shields.io/npm/v/react-code-preview-layout.svg)](https://www.npmjs.com/package/react-code-preview-layout)
68+
69+
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-code-preview-layout/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
70+
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
71+
72+
```bash
73+
npm i idoc@${{steps.changelog.outputs.version}}
74+
```
75+
76+
${{ steps.changelog.outputs.changelog }}
77+
78+
- uses: JS-DevTools/npm-publish@v1
79+
with:
80+
token: ${{ secrets.NPM_TOKEN }}
81+
package: ./core/package.json

0 commit comments

Comments
 (0)