Release & Publish to NPM #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release & Publish to NPM | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version bump type' | |
required: true | |
default: 'minor' | |
type: choice | |
options: | |
- major | |
- minor | |
- patch | |
jobs: | |
release: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
- name: Install the dependencies | |
run: yarn install | |
- name: Initialize Git Config | |
run: | | |
git config --global user.email "jhj9422@unist.ac.kr" | |
git config --global user.name "haejunejung" | |
- name: Initialize NPM Config | |
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Run Release | |
run: npm run release ${{ github.event.inputs.version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: End Message | |
run: echo `All done` |