Skip to content

Release

Release #89

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
version:
type: choice
description: 'Version level'
required: true
default: 'patch'
options:
- patch
- minor
- major
jobs:
Publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Git Identity
run: |
git config --global user.name 'baopso'
git config --global user.email '[email protected]'
git remote set-url origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch all Tags and Pull
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
git pull
- name: Install Lerna globally
run: npm install lerna --global
- name: Update npm registry
run: npm run update:registry
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Documentation
run: npm run docs
- uses: EndBug/add-and-commit@v5
with:
message: 'chore(): update build artifacts'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to NPM
run: 'lerna publish ${{ github.event.inputs.version }} --yes'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update Lock files
run: 'npm run update:lock'
- uses: EndBug/add-and-commit@v5
with:
message: 'chore(): update lock files'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}