Skip to content

Commit d8ec0d8

Browse files
committed
chore: update workflows config.
1 parent 4c48eaf commit d8ec0d8

File tree

2 files changed

+64
-13
lines changed

2 files changed

+64
-13
lines changed

.github/workflows/ci.yml

+22-13
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,26 @@ jobs:
5454
</body></html>
5555
EOF
5656
57-
- name: Create Tag
57+
- name: Is a tag created auto?
5858
id: create_tag
59-
uses: jaywcjlove/create-tag-action@v1.2.1
59+
uses: jaywcjlove/create-tag-action@v1.3.6
6060
with:
61-
token: ${{ secrets.GITHUB_TOKEN }}
6261
package-path: ./package.json
6362

63+
- name: get tag version
64+
id: tag_version
65+
uses: jaywcjlove/changelog-generator@v1.5.0
66+
67+
- name: Deploy
68+
uses: peaceiris/actions-gh-pages@v3
69+
with:
70+
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
71+
github_token: ${{ secrets.GITHUB_TOKEN }}
72+
publish_dir: ./build
73+
6474
- name: Generate Changelog
6575
id: changelog
66-
uses: jaywcjlove/changelog-generator@v1.4.6
76+
uses: jaywcjlove/changelog-generator@v1.5.0
6777
if: steps.create_tag.outputs.successful
6878
with:
6979
token: ${{ secrets.GITHUB_TOKEN }}
@@ -81,20 +91,19 @@ jobs:
8191
body: |
8292
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/reset.css@${{steps.create_tag.outputs.versionNumber}}/file/README.md)
8393
94+
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/reset-css/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
95+
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
96+
8497
```bash
8598
npm i @uiw/reset.css@${{steps.create_tag.outputs.versionNumber}}
8699
```
87-
88-
${{ steps.changelog.outputs.compareurl }}
89-
100+
90101
${{ steps.changelog.outputs.changelog }}
91102
92103
- run: git status
93-
- run: npm install @jsdevtools/npm-publish -g
94-
- run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json
95104

96-
- name: Deploy
97-
uses: peaceiris/actions-gh-pages@v3
105+
- name: 📦 @uiw/reset.css publish to NPM
106+
uses: JS-DevTools/npm-publish@v1
98107
with:
99-
github_token: ${{ secrets.GITHUB_TOKEN }}
100-
publish_dir: ./build
108+
token: ${{ secrets.NPM_TOKEN }}
109+
package: ./package.json

.github/workflows/publish.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish Package to npmjs
2+
on:
3+
release:
4+
types: [created]
5+
6+
jobs:
7+
github-publish:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
packages: write
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: '16.x'
17+
registry-url: 'https://npm.pkg.github.com'
18+
scope: '@uiwjs'
19+
- run: npm install
20+
- run: npm run compile
21+
- run: npm run compile:min
22+
- run: npm publish
23+
env:
24+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
26+
npm-publish:
27+
runs-on: ubuntu-18.04
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: actions/setup-node@v2
31+
with:
32+
node-version: 14
33+
34+
- run: npm install
35+
- run: npm run compile
36+
- run: npm run compile:min
37+
38+
- name: 📦 @uiw/reset.css publish to NPM
39+
uses: JS-DevTools/npm-publish@v1
40+
with:
41+
token: ${{ secrets.NPM_TOKEN }}
42+
package: ./package.json

0 commit comments

Comments
 (0)