Skip to content

Commit 0196bc3

Browse files
committed
chore: add workflows config.
1 parent be5aa34 commit 0196bc3

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

.github/workflows/ci.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
Build_Deploy:
9+
runs-on: ubuntu-18.04
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: 14
15+
16+
- run: npm install
17+
- run: npm run build
18+
- run: npm run doc
19+
- run: cp -rp coverage dist
20+
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: dist/CONTRIBUTORS.svg
26+
avatarSize: 42
27+
28+
- name: Create Tag
29+
id: create_tag
30+
uses: jaywcjlove/[email protected]
31+
with:
32+
package-path: ./package.json
33+
34+
- name: get tag version
35+
id: tag_version
36+
uses: jaywcjlove/[email protected]
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: ./dist
46+
47+
- name: Generate Changelog
48+
id: changelog
49+
uses: jaywcjlove/[email protected]
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://kktjs.github.io/npm-unpkg/#/pkg/babel-plugin-transform-replace-export-default@${{steps.changelog.outputs.version}}/file/README.md) [![npm version](https://img.shields.io/npm/v/babel-plugin-transform-replace-export-default.svg)](https://www.npmjs.com/package/babel-plugin-transform-replace-export-default)
64+
65+
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/kktjs/babel-plugin-transform-replace-export-default/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
66+
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
67+
68+
```bash
69+
npm i babel-plugin-transform-replace-export-default@${{steps.changelog.outputs.version}}
70+
```
71+
72+
${{ steps.changelog.outputs.changelog }}
73+
74+
- uses: JS-DevTools/npm-publish@v1
75+
with:
76+
token: ${{ secrets.NPM_TOKEN }}
77+
package: ./package.json

0 commit comments

Comments
 (0)