Skip to content

Commit b1be58c

Browse files
committed
chore: update workflows config.
1 parent cee897c commit b1be58c

File tree

2 files changed

+41
-25
lines changed

2 files changed

+41
-25
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,27 @@ jobs:
77
build-deploy:
88
runs-on: ubuntu-18.04
99
steps:
10-
- uses: actions/checkout@master
11-
12-
- name: Setup Node
13-
uses: actions/setup-node@v1
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-node@v2
1412
with:
15-
node-version: '10.x'
13+
node-version: 14
1614

1715
- name: Generate Changelog
1816
id: changelog
19-
uses: jaywcjlove/changelog-generator@v1.3.9
17+
uses: jaywcjlove/changelog-generator@v1.4.1
2018
with:
2119
token: ${{ secrets.GITHUB_TOKEN }}
20+
head-ref: ${{steps.create_tag.outputs.version}}
2221
filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot)
23-
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
22+
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
2423

2524
- run: npm install
2625
- run: npm run build
2726
- run: npm run dash
2827

29-
- name: Build and Deploy
30-
uses: peaceiris/actions-gh-pages@v2.5.0
31-
env:
32-
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
33-
PUBLISH_BRANCH: gh-pages
34-
PUBLISH_DIR: ./.deploy
28+
- name: Deploy
29+
uses: peaceiris/actions-gh-pages@v3
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
publish_dir: ./.deploy
33+

.github/workflows/release.yml

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ jobs:
99
test:
1010
runs-on: ubuntu-18.04
1111
steps:
12-
# To use this repository's private action, you must check out the repository
13-
- name: Checkout
14-
uses: actions/checkout@v2
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: 14
1516

16-
- name: Generate changelog
17+
- name: Generate Changelog
1718
id: changelog
1819
uses: jaywcjlove/changelog-generator@v1.3.9
1920
with:
@@ -22,15 +23,31 @@ jobs:
2223
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
2324

2425
- name: Create Release
25-
id: create_release
26-
uses: actions/create-release@latest
27-
env:
28-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
uses: ncipollo/release-action@v1
2927
with:
30-
tag_name: ${{ github.ref }}
31-
release_name: ${{ github.ref }}
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
name: ${{ steps.changelog.outputs.tag }}
30+
tag: ${{ steps.changelog.outputs.tag }}
3231
body: |
32+
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/linux-command@${{steps.changelog.outputs.versionNumber}}/file/README.md) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/linux-command)](https://bundlephobia.com/result?p=linux-command@${{steps.changelog.outputs.versionNumber}})
33+
34+
```bash
35+
npm i linux-command@${{steps.changelog.outputs.version}}
36+
```
37+
3338
${{ steps.changelog.outputs.compareurl }}
3439
${{ steps.changelog.outputs.changelog }}
35-
draft: false
36-
prerelease: false
40+
41+
- run: npm install
42+
- run: npm run build
43+
44+
- run: npm install @jsdevtools/npm-publish -g
45+
- run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json
46+
47+
- run: npm run dash
48+
49+
- name: Deploy
50+
uses: peaceiris/actions-gh-pages@v3
51+
with:
52+
github_token: ${{ secrets.GITHUB_TOKEN }}
53+
publish_dir: ./.deploy

0 commit comments

Comments
 (0)