Skip to content

feat(lib/workflow): 新增 addWorkflowItems 方法 #62

feat(lib/workflow): 新增 addWorkflowItems 方法

feat(lib/workflow): 新增 addWorkflowItems 方法 #62

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Standard Version
on:
push:
branches: [ master ]
paths:
- 'lib/**'
- 'bin/**'
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'
env:
REPO_NAME: ${{ github.event.repository.name }}
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [ 14.17.1 ]
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v2.1.3
with:
path: |
**/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
run: |
npm install
- name: Build
run: |
git config --global user.email "alan@1991421.cn"
git config --global user.name "Alan He"
npm run build
npm run release
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
tags: true
- name: Publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
- name: Notify
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
*${{env.REPO_NAME}}* published, see here(https://github.com/${{github.repository}}).
format: "markdown"