Skip to content

Commit 0a4a0c9

Browse files
committedApr 9, 2023
chore: update workflows config.
1 parent 9f398ff commit 0a4a0c9

File tree

1 file changed

+48
-46
lines changed

1 file changed

+48
-46
lines changed
 

‎.github/workflows/ci.yml

+48-46
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build & Deploy
1+
name: Website & Publishing
22
on:
33
push:
44
branches:
@@ -8,59 +8,61 @@ env:
88

99
jobs:
1010
build-deploy:
11-
runs-on: ubuntu-18.04
11+
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
14-
- uses: actions/setup-node@v3
15-
with:
16-
node-version: 16
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: 16
17+
registry-url: 'https://registry.npmjs.org'
1718

18-
- run: npm install
19-
- run: npm run build
20-
- run: npm run coverage
2119

22-
- run: npm i coverage-badges-cli markdown-to-html-cli -g
23-
- run: coverage-badges
24-
- run: markdown-to-html --output coverage/index.html
20+
- run: npm install
21+
- run: npm run build
22+
- run: npm run coverage
2523

26-
- name: Deploy
27-
uses: peaceiris/actions-gh-pages@v3
28-
with:
29-
github_token: ${{ secrets.GITHUB_TOKEN }}
30-
publish_dir: ./coverage
24+
- run: npm i coverage-badges-cli markdown-to-html-cli -g
25+
- run: coverage-badges
26+
- run: markdown-to-html --output coverage/index.html
3127

32-
- run: npm install @jsdevtools/npm-publish -g
33-
- run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json
28+
- name: Deploy
29+
uses: peaceiris/actions-gh-pages@v3
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
publish_dir: ./coverage
3433

35-
- name: Create Tag
36-
id: create_tag
37-
uses: jaywcjlove/create-tag-action@v1.3.8
38-
with:
39-
package-path: ./package.json
34+
- run: npm install @jsdevtools/npm-publish -g
35+
- run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json
4036

41-
- name: Generate Changelog
42-
id: changelog
43-
uses: jaywcjlove/changelog-generator@v1.5.7
44-
with:
45-
token: ${{ secrets.GITHUB_TOKEN }}
46-
head-ref: ${{steps.create_tag.outputs.version}}
47-
filter-author: (小弟调调™|dependabot|renovate\\[bot\\]|dependabot\\[bot\\]|Renovate Bot)
48-
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
37+
- name: Create Tag
38+
id: create_tag
39+
uses: jaywcjlove/create-tag-action@main
40+
with:
41+
package-path: ./package.json
4942

50-
- name: Create Release
51-
uses: ncipollo/release-action@v1
52-
if: steps.create_tag.outputs.successful
53-
with:
54-
name: ${{ steps.create_tag.outputs.version }}
55-
tag: ${{ steps.create_tag.outputs.version }}
56-
token: ${{ secrets.GITHUB_TOKEN }}
57-
body: |
58-
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/bannerjs@${{steps.create_tag.outputs.versionNumbe}}/file/README.md)
43+
- name: Generate Changelog
44+
id: changelog
45+
uses: jaywcjlove/changelog-generator@main
46+
with:
47+
token: ${{ secrets.GITHUB_TOKEN }}
48+
head-ref: ${{steps.create_tag.outputs.version}}
49+
filter-author: (小弟调调™|dependabot|renovate\\[bot\\]|dependabot\\[bot\\]|Renovate Bot)
50+
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
5951

60-
```bash
61-
npm i bannerjs@${{steps.create_tag.outputs.versionNumber}}
62-
```
52+
- name: Create Release
53+
uses: ncipollo/release-action@v1
54+
if: steps.create_tag.outputs.successful
55+
with:
56+
name: ${{ steps.create_tag.outputs.version }}
57+
tag: ${{ steps.create_tag.outputs.version }}
58+
token: ${{ secrets.GITHUB_TOKEN }}
59+
body: |
60+
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/bannerjs@${{steps.create_tag.outputs.versionNumbe}}/file/README.md)
6361
64-
${{ steps.changelog.outputs.compareurl }}
62+
```bash
63+
npm i bannerjs@${{steps.create_tag.outputs.versionNumber}}
64+
```
6565
66-
${{ steps.changelog.outputs.changelog }}
66+
${{ steps.changelog.outputs.compareurl }}
67+
68+
${{ steps.changelog.outputs.changelog }}

0 commit comments

Comments
 (0)
Please sign in to comment.