Skip to content

update comments

update comments #23

Workflow file for this run

name: npm_publish
on:
push:
branches:
- main
jobs:
bump_version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: gh-action-bump-version
uses: "phips28/gh-action-bump-version@master"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
minor-wording: "MINOR"
major-wording: "MAJOR"
patch-wording: "PATCH"
target-branch: "main"
# 상수로 commit_sha 넣어도, 다음 스텝에서 이상하게 저장이 안된다
# - name: set output
# id: lastest_head
# run: |
# echo "commit_sha=$(git rev-parse HEAD) >> $GITHUB_OUTPUT"
# outputs:
# ref: ${{ steps.lastest_head.outputs.commit_sha }}
npm_publish:
needs: [bump_version]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# 그래서, github.ref를 사용해서, branch에 대한 완전한 참조를 얻은 뒤 사용.
ref: ${{github.ref}}
- name: Install dependencies
run: npm install
- name: Build and Publish
run: |
npm run build
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
npm publish