Skip to content

Release

Release #97

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Release
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
versiontype:
description: 'major | minor | patch'
required: false
default: 'minor'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: '15'
- name: Configure Git
run: |
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
- name: bump version
run: npm version ${{ github.event.inputs.versiontype }}
- name: npm install
run: npm i
- name: build
run: npm run build
- uses: EndBug/add-and-commit@v7 # You can change this to use a specific version
with:
# Determines the way the action fills missing author name and email. Three options are available:
# - github_actor -> UserName <UserName@users.noreply.github.com>
# - user_info -> Your Display Name <your-actual@email.com>
# - github_actions -> github-actions <email associated with the github logo>
# Default: github_actor
default_author: github_actions
# The message for the commit
# Default: 'Commit from GitHub Actions (name of the workflow)'
message: 'build'
- run: npm run docs
- uses: EndBug/add-and-commit@v7
with:
default_author: github_actions
message: 'build docs'
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}