Skip to content

Commit

Permalink
npm 자동 배포 워크플로우 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
love1ace committed Sep 20, 2024
1 parent c7bdb09 commit 0a01825
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,30 @@ jobs:
- name: Check out the repository
uses: actions/checkout@v3

# 2. Node.js 설치 (원하는 Node 버전을 설정 가능)
# 2. Node.js 설치
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'

# 3. npm 인증 설정 (NPM_TOKEN을 이용해 자동 로그인)
# 3. npm 인증 설정
- name: Authenticate to npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

# 4. npm 설치
# 4. 패치 버전 자동 증가
- name: Bump version and push tag
run: |
npm version patch # 패치 버전 0.0.1 증가
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git push origin main --tags
# 5. npm 설치
- name: Install dependencies
run: npm install

# 5. npm publish 실행
# 6. npm publish 실행
- name: Publish package
run: npm publish
env:
Expand Down

0 comments on commit 0a01825

Please sign in to comment.