Skip to content

Commit 25168e6

Browse files
committed
chore: update workflow config.
1 parent 58c7c69 commit 25168e6

File tree

1 file changed

+81
-71
lines changed

1 file changed

+81
-71
lines changed

.github/workflows/ci.marster.yml

Lines changed: 81 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -8,87 +8,97 @@ jobs:
88
build-deploy:
99
runs-on: ubuntu-18.04
1010
steps:
11-
- uses: actions/checkout@v2
12-
- uses: actions/setup-node@v2
13-
with:
14-
node-version: 14
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: 14
1515

16-
- run: npm install
17-
- run: npm run coverage
18-
- run: npm run doc
19-
- run: npm run bundle
20-
- run: npm run bundle:min
16+
- run: npm install
17+
- run: npm run coverage
18+
- run: npm run doc
19+
- run: npm run bundle
20+
- run: npm run bundle:min
2121

22-
- run: cp -rp coverage build
22+
- run: cp -rp coverage build
2323

24-
- name: Create Coverage Badges
25-
uses: jaywcjlove/coverage-badges-cli@main
26-
with:
27-
output: build/badge.svg
24+
- name: Create Coverage Badges
25+
uses: jaywcjlove/coverage-badges-cli@main
26+
with:
27+
output: build/badge.svg
2828

29-
- name: Generate Contributors Images
30-
uses: jaywcjlove/github-action-contributors@main
31-
with:
32-
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
33-
output: build/CONTRIBUTORS.svg
34-
avatarSize: 42
29+
- name: Generate Contributors Images
30+
uses: jaywcjlove/github-action-contributors@main
31+
with:
32+
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
33+
output: build/CONTRIBUTORS.svg
34+
avatarSize: 42
3535

36-
- name: Is a tag created auto?
37-
id: create_tag
38-
uses: jaywcjlove/[email protected]
39-
with:
40-
token: ${{ secrets.GITHUB_TOKEN }}
41-
package-path: ./package.json
36+
- name: Is a tag created auto?
37+
id: create_tag
38+
uses: jaywcjlove/[email protected]
39+
with:
40+
token: ${{ secrets.GITHUB_TOKEN }}
41+
package-path: ./package.json
4242

43-
- name: get tag version
44-
id: tag_version
45-
uses: jaywcjlove/[email protected]
43+
- name: get tag version
44+
id: tag_version
45+
uses: jaywcjlove/[email protected]
4646

47-
- name: Deploy
48-
uses: peaceiris/actions-gh-pages@v3
49-
with:
50-
user_name: 'github-actions[bot]'
51-
user_email: 'github-actions[bot]@users.noreply.github.com'
52-
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
53-
github_token: ${{ secrets.GITHUB_TOKEN }}
54-
publish_dir: ./build
47+
- name: Deploy
48+
uses: peaceiris/actions-gh-pages@v3
49+
with:
50+
user_name: 'github-actions[bot]'
51+
user_email: 'github-actions[bot]@users.noreply.github.com'
52+
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
53+
github_token: ${{ secrets.GITHUB_TOKEN }}
54+
publish_dir: ./build
5555

56-
- name: Generate Changelog
57-
id: changelog
58-
uses: jaywcjlove/[email protected]
59-
if: steps.create_tag.outputs.successful
60-
with:
61-
token: ${{ secrets.GITHUB_TOKEN }}
62-
head-ref: ${{ steps.create_tag.outputs.version }}
63-
filter-author: (小弟调调™|Renovate Bot)
64-
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
56+
- name: Generate Changelog
57+
id: changelog
58+
uses: jaywcjlove/[email protected]
59+
if: steps.create_tag.outputs.successful
60+
with:
61+
token: ${{ secrets.GITHUB_TOKEN }}
62+
head-ref: ${{ steps.create_tag.outputs.version }}
63+
filter-author: (小弟调调™|Renovate Bot)
64+
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
6565

66-
- name: Create Release
67-
uses: ncipollo/release-action@v1
68-
if: steps.create_tag.outputs.successful
69-
with:
70-
token: ${{ secrets.GITHUB_TOKEN }}
71-
name: ${{ steps.create_tag.outputs.version }}
72-
tag: ${{ steps.create_tag.outputs.version }}
73-
body: |
74-
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-markdown-preview@${{steps.create_tag.outputs.versionNumber}}/file/README.md)
66+
- name: Create Release
67+
uses: ncipollo/release-action@v1
68+
if: steps.create_tag.outputs.successful
69+
with:
70+
token: ${{ secrets.GITHUB_TOKEN }}
71+
name: ${{ steps.create_tag.outputs.version }}
72+
tag: ${{ steps.create_tag.outputs.version }}
73+
body: |
74+
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-markdown-preview@${{steps.create_tag.outputs.versionNumber}}/file/README.md)
7575
76-
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-markdown-preview/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
77-
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
76+
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-markdown-preview/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
77+
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
7878
79-
${{ steps.changelog.outputs.changelog }}
79+
${{ steps.changelog.outputs.changelog }}
8080
81-
```bash
82-
npm i @uiw/react-markdown-preview@${{steps.create_tag.outputs.versionNumber}}
83-
```
81+
```bash
82+
npm i @uiw/react-markdown-preview@${{steps.create_tag.outputs.versionNumber}}
83+
```
8484
85-
- name: 📦 @uiw/react-markdown-preview publish to NPM
86-
uses: JS-DevTools/npm-publish@v1
87-
with:
88-
token: ${{ secrets.NPM_TOKEN }}
89-
package: ./package.json
90-
91-
- name: Coveralls
92-
uses: coverallsapp/github-action@master
93-
with:
94-
github-token: ${{ secrets.GITHUB_TOKEN }}
85+
- name: 📦 @uiw/react-markdown-preview publish to NPM
86+
uses: JS-DevTools/npm-publish@v1
87+
with:
88+
token: ${{ secrets.NPM_TOKEN }}
89+
package: ./package.json
90+
91+
- name: Coveralls
92+
uses: coverallsapp/github-action@master
93+
with:
94+
github-token: ${{ secrets.GITHUB_TOKEN }}
95+
96+
- name: Modify @uiw/react-markdown-preview => @uiwjs/react-markdown-preview
97+
uses: jaywcjlove/github-action-package@main
98+
with:
99+
data: |
100+
{ "name": "@uiwjs/react-markdown-preview" }
101+
102+
- run: npm publish
103+
env:
104+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)