linux-command/.github/workflows/ci.yml

61 lines
1.9 KiB
YAML

name: GitHub Actions Build and Deploy linux-command
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@v1.4.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot)
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
- run: npm install
- run: npm run build
- run: npm install @jsdevtools/npm-publish -g
- run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json
- run: npm run dash
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./.deploy
- name: Create Tag
id: create_tag
uses: jaywcjlove/create-tag-action@v1.2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
package-path: ./package.json
- name: Create Release
uses: ncipollo/release-action@v1
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.create_tag.outputs.version }}
tag: ${{ steps.create_tag.outputs.version }}
body: |
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/linux-command@${{steps.create_tag.outputs.versionNumber}}/file/README.md) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/linux-command)](https://bundlephobia.com/result?p=linux-command@${{steps.create_tag.outputs.versionNumber}})
```bash
npm i linux-command@${{steps.create_tag.outputs.versionNumber}}
```
${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}