chore: update .github/workflows/ci.yml

This commit is contained in:
jaywcjlove
2021-10-05 06:15:34 +08:00
parent d9dab546cb
commit 0941b17adb

View File

@@ -20,4 +20,43 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_dir: ./dist
- name: Create Tag
id: create_tag
uses: jaywcjlove/create-tag-action@v1.2.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
package-path: ./package.json
- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@v1.4.6
with:
token: ${{ secrets.GITHUB_TOKEN }}
head-ref: ${{steps.create_tag.outputs.version}}
filter-author: (小弟调调™|Renovate Bot)
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
- name: Create Release
uses: ncipollo/release-action@v1
if: steps.create_tag.outputs.successful
with:
name: ${{ steps.create_tag.outputs.version }}
tag: ${{ steps.create_tag.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
body: |
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/awesome-mac@${{steps.changelog.outputs.version}}/file/README.md)
${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
```bash
npm i awesome-mac
# dist/awesome-mac.json
# dist/awesome-mac.zh.json
```
- run: npm install @jsdevtools/npm-publish -g
- run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json