Skip to content

NPM Publish

NPM Publish #18

Workflow file for this run

name: NPM Publish
on:
workflow_dispatch:
inputs:
version:
description: "Version Upgrade"
required: true
default: "patch"
type: choice
options:
- patch
- minor
- major
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
- name: Install
run: npm install
- name: Test
run : npm run test
- name: Version
run: npm version ${{ inputs.version }} --no-git-tag-version
- name: Build
run: npm run build
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Commit
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git commit -am "published ${{ inputs.version }} update"
git push