Skip to content

Workflow file for this run

name: NPM 배포 및 릴리즈 노트 작성
on:
push:
tags:
- v*.*.*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 저장소 가져오기
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Node 설정
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: yarn
registry-url: https://registry.npmjs.org
- name: 의존성 설치
run: yarn install --frozen-lockfile
- name: 프로젝트 빌드
run: yarn publish:npm
- name: NPM 배포
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
run: npm publish --access public
- name: 버전 가져오기
id: version
run: |
tag=${GITHUB_REF/refs\/tags\//}
version=${tag#v}
major=${version%%.*}
echo "tag=${tag}" >> $GITHUB_OUTPUT
echo "version=${version}" >> $GITHUB_OUTPUT
echo "major=${major}" >> $GITHUB_OUTPUT
- name: 릴리즈 노트 작성
uses: release-drafter/release-drafter@master
with:
version: ${{ steps.version.outputs.version }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}