Skip to content

Commit

Permalink
chore: update workflows config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 4, 2021
1 parent 8a383a7 commit 6beefbd
Showing 1 changed file with 42 additions and 12 deletions.
54 changes: 42 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,49 @@ jobs:
build-deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master

- name: Setup Node
uses: actions/setup-node@v1
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '10.x'
node-version: 14

- run: npm install
- run: npm run build
- run: npm run build:lib
- run: npm run doc

- name: Create Tag
id: create_tag
uses: jaywcjlove/create-tag-action@v1.1.10
with:
token: ${{ secrets.GITHUB_TOKEN }}
package-path: ./package.json

- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@v1.3.10
with:
token: ${{ secrets.GITHUB_TOKEN }}
head-ref: ${{steps.create_tag.outputs.version}}
filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot)
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build

- name: Create Release
uses: ncipollo/release-action@v1
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.create_tag.outputs.version }}
tag: ${{ steps.create_tag.outputs.version }}
body: |
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-prismjs@${{steps.create_tag.outputs.versionNumber}}/file/README.md) [![](https://img.shields.io/github/issues/uiwjs/react-prismjs.svg)](https://github.com/uiwjs/react-prismjs/releases) [![](https://img.shields.io/github/forks/uiwjs/react-prismjs.svg)](https://github.com/uiwjs/react-prismjs/network) [![](https://img.shields.io/github/stars/uiwjs/react-prismjs.svg)](https://github.com/uiwjs/react-prismjs/stargazers) [![](https://img.shields.io/github/release/uiwjs/react-prismjs.svg)](https://github.com/uiwjs/react-prismjs/releases) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/@uiw/react-prismjs)](https://bundlephobia.com/result?p=@uiw/react-prismjs@${{steps.create_tag.outputs.versionNumber}})
```bash
npm i @uiw/react-prismjs@${{steps.create_tag.outputs.versionNumber}}
```
- name: Build and Deploy
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./build
${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}

0 comments on commit 6beefbd

Please sign in to comment.