Skip to content

Commit cbb52eb

Browse files
committed
ci: update workflows config.
1 parent 25b4376 commit cbb52eb

File tree

1 file changed

+44
-46
lines changed

1 file changed

+44
-46
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22
on:
33
push:
44
branches:
5-
- v2
5+
- main
66

77
jobs:
88
build-deploy:
@@ -20,68 +20,66 @@ jobs:
2020
- run: npm run build
2121
- run: npm run coverage
2222
- run: npm run doc
23-
# working-directory: ./www
2423

25-
# - name: Create Coverage Badges
26-
# uses: jaywcjlove/coverage-badges-cli@main
27-
# with:
28-
# source: core/coverage/coverage-summary.json
29-
# output: ./www/build/badges.svg
24+
- name: Create Coverage Badges
25+
uses: jaywcjlove/coverage-badges-cli@main
26+
with:
27+
source: core/coverage/coverage-summary.json
28+
output: ./www/build/badges.svg
3029

31-
# - run: cp -rp core/coverage/lcov-report ./www/build/
30+
- run: cp -rp core/coverage/lcov-report ./www/build/
3231

33-
# - name: Generate Contributors Images
34-
# uses: jaywcjlove/github-action-contributors@main
35-
# with:
36-
# filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
37-
# output: www/build/CONTRIBUTORS.svg
38-
# avatarSize: 42
32+
- name: Generate Contributors Images
33+
uses: jaywcjlove/github-action-contributors@main
34+
with:
35+
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
36+
output: www/build/CONTRIBUTORS.svg
37+
avatarSize: 42
3938

40-
# - name: Create Tag
41-
# id: create_tag
42-
# uses: jaywcjlove/create-tag-action@main
43-
# with:
44-
# token: ${{ secrets.GITHUB_TOKEN }}
45-
# package-path: ./core/package.json
39+
- name: Create Tag
40+
id: create_tag
41+
uses: jaywcjlove/create-tag-action@main
42+
with:
43+
token: ${{ secrets.GITHUB_TOKEN }}
44+
package-path: ./core/package.json
4645

47-
# - name: get tag version
48-
# id: tag_version
49-
# uses: jaywcjlove/changelog-generator@main
46+
- name: get tag version
47+
id: tag_version
48+
uses: jaywcjlove/changelog-generator@main
5049

5150
- name: Deploy
5251
uses: peaceiris/actions-gh-pages@v3
5352
with:
5453
commit_message: ${{ github.event.head_commit.message }}
5554
github_token: ${{ secrets.GITHUB_TOKEN }}
5655
publish_dir: ./www/build
57-
publish_branch: v2-docs
5856

59-
# - name: Generate Changelog
60-
# id: changelog
61-
# uses: jaywcjlove/changelog-generator@main
62-
# with:
63-
# head-ref: ${{steps.create_tag.outputs.version}}
64-
# filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
57+
- name: Generate Changelog
58+
id: changelog
59+
uses: jaywcjlove/changelog-generator@main
60+
with:
61+
head-ref: ${{steps.create_tag.outputs.version}}
62+
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
6563

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-json-view@${{steps.create_tag.outputs.versionNumber}}/file/README.md)
64+
- name: Create Release
65+
uses: ncipollo/release-action@v1
66+
if: steps.create_tag.outputs.successful
67+
with:
68+
token: ${{ secrets.GITHUB_TOKEN }}
69+
name: ${{ steps.create_tag.outputs.version }}
70+
tag: ${{ steps.create_tag.outputs.version }}
71+
body: |
72+
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-json-view@${{steps.create_tag.outputs.versionNumber}}/file/README.md)
7573
76-
# Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-json-view/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
77-
# Or Doc Website: https://htmlpreview.github.io/?https://github.com/uiwjs/react-json-view/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
78-
# Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
74+
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-json-view/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
75+
Or Doc Website: https://htmlpreview.github.io/?https://github.com/uiwjs/react-json-view/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
76+
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
7977
80-
# ```bash
81-
# npm i @uiw/react-json-view@${{steps.create_tag.outputs.versionNumber}}
82-
# ```
78+
```bash
79+
npm i @uiw/react-json-view@${{steps.create_tag.outputs.versionNumber}}
80+
```
8381
84-
# ${{ steps.changelog.outputs.changelog }}
82+
${{ steps.changelog.outputs.changelog }}
8583
8684
- run: npm publish --access public
8785
name: 📦 @uiw/react-json-view publish to NPM

0 commit comments

Comments
 (0)