Skip to content

Commit 761b976

Browse files
committed
chore: update workflows config.
1 parent bf060ae commit 761b976

File tree

1 file changed

+65
-58
lines changed

1 file changed

+65
-58
lines changed

.github/workflows/ci.yml

Lines changed: 65 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -5,73 +5,80 @@ on:
55
- master
66
jobs:
77
build-deploy:
8-
runs-on: ubuntu-18.04
8+
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
11-
- uses: actions/setup-node@v2
12-
with:
13-
node-version: 14
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-node@v3
12+
with:
13+
node-version: 16
14+
registry-url: 'https://registry.npmjs.org'
1415

15-
- run: npm install
16-
- run: npm run build
17-
- run: npm run doc
16+
- run: npm install
17+
- run: npm run build
18+
- run: npm run doc
1819

19-
- name: Generate Contributors Images
20-
uses: jaywcjlove/github-action-contributors@main
21-
with:
22-
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
23-
output: build/CONTRIBUTORS.svg
24-
avatarSize: 42
20+
- name: Generate Contributors Images
21+
uses: jaywcjlove/github-action-contributors@main
22+
with:
23+
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
24+
output: build/CONTRIBUTORS.svg
25+
avatarSize: 42
2526

26-
- name: Is a tag created auto?
27-
id: create_tag
28-
uses: jaywcjlove/create-tag-action@v1.3.6
29-
with:
30-
package-path: ./package.json
27+
- name: Is a tag created auto?
28+
id: create_tag
29+
uses: jaywcjlove/create-tag-action@main
30+
with:
31+
package-path: ./package.json
3132

32-
- name: get tag version
33-
id: tag_version
34-
uses: jaywcjlove/changelog-generator@v1.5.0
33+
- name: get tag version
34+
id: tag_version
35+
uses: jaywcjlove/changelog-generator@main
3536

36-
- name: Deploy
37-
uses: peaceiris/actions-gh-pages@v3
38-
with:
39-
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
40-
github_token: ${{ secrets.GITHUB_TOKEN }}
41-
publish_dir: ./build
37+
- name: Deploy
38+
uses: peaceiris/actions-gh-pages@v3
39+
with:
40+
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
publish_dir: ./build
4243

43-
- name: Generate Changelog
44-
id: changelog
45-
uses: jaywcjlove/changelog-generator@v1.5.0
46-
with:
47-
head-ref: ${{steps.create_tag.outputs.version}}
48-
filter-author: (renovate-bot|dependabot|dependabot\[bot\]|Renovate Bot)
49-
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
44+
- name: Generate Changelog
45+
id: changelog
46+
uses: jaywcjlove/changelog-generator@main
47+
with:
48+
head-ref: ${{steps.create_tag.outputs.version}}
49+
filter-author: (renovate-bot|dependabot|dependabot\[bot\]|Renovate Bot)
50+
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
5051

51-
- name: Create Release
52-
uses: ncipollo/release-action@v1
53-
if: steps.create_tag.outputs.successful
54-
with:
55-
token: ${{ secrets.GITHUB_TOKEN }}
56-
name: ${{ steps.create_tag.outputs.version }}
57-
tag: ${{ steps.create_tag.outputs.version }}
58-
body: |
59-
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-codepen@${{ steps.create_tag.outputs.versionNumber }}/file/README.md)
52+
- name: Create Release
53+
uses: ncipollo/release-action@v1
54+
if: steps.create_tag.outputs.successful
55+
with:
56+
token: ${{ secrets.GITHUB_TOKEN }}
57+
name: ${{ steps.create_tag.outputs.version }}
58+
tag: ${{ steps.create_tag.outputs.version }}
59+
body: |
60+
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-codepen@${{ steps.create_tag.outputs.versionNumber }}/file/README.md)
6061
61-
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-codepen/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
62-
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
62+
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-codepen/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
63+
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
6364
64-
```bash
65-
npm i @uiw/react-codepen@${{ steps.create_tag.outputs.versionNumber }}
66-
```
67-
68-
${{ steps.changelog.outputs.changelog }}
65+
```bash
66+
npm i @uiw/react-codepen@${{ steps.create_tag.outputs.versionNumber }}
67+
```
68+
69+
${{ steps.changelog.outputs.changelog }}
6970
70-
- uses: JS-DevTools/npm-publish@v1
71-
with:
72-
token: ${{ secrets.NPM_TOKEN }}
73-
package: ./package.json
7471
75-
# - run: git status
76-
# - run: npm install @jsdevtools/npm-publish -g
77-
# - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json
72+
- run: npm publish --access public
73+
continue-on-error: true
74+
env:
75+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
76+
77+
# - uses: JS-DevTools/npm-publish@v1
78+
# with:
79+
# token: ${{ secrets.NPM_TOKEN }}
80+
# package: ./package.json
81+
82+
# - run: git status
83+
# - run: npm install @jsdevtools/npm-publish -g
84+
# - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json

0 commit comments

Comments
 (0)