Skip to content

itcode-dev/eslint-config NPM Publish #20

itcode-dev/eslint-config NPM Publish

itcode-dev/eslint-config NPM Publish #20

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: itcode-dev/eslint-config NPM Publish
on:
workflow_dispatch:
inputs:
version:
type: choice
description: 업데이트할 버전 선택
required: true
options:
- patch
- minor
- major
jobs:
versioning:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Version Update
run: |
echo "@itcode.dev/eslint-config ${{ github.event.inputs.version }} 업그레이드"
git config --global user.email "${{ vars.EMAIL }}"
git config --global user.name "${{ vars.NAME }}"
npm version ${{ github.event.inputs.version }}
git push
tag:
needs: versioning
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Tag Push
run: |
echo "@itcode.dev/eslint-config 태그 생성"
git push origin --tag
publish:
needs: tag
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: NPM Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}