-
-
Notifications
You must be signed in to change notification settings - Fork 3
릴리즈 발행시 동작하는 배포 워크플로우 생성 #654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c403cdf
ci: create release workflow
HowToBeAHappyBoy 5675164
fix: 릴리즈 발행시 배포되도록 워크플로우 수정
HowToBeAHappyBoy 46e3293
fix: 불필요한 권한 제거
HowToBeAHappyBoy 38129c8
fix: 권한을 최소로 설정
HowToBeAHappyBoy 50e0f65
fix: 디폴트 권한 제거
HowToBeAHappyBoy 8e45900
ci: setup node 추가, tag 버전과 packages.json 버전 확인 과정 추가
HowToBeAHappyBoy 9f751c4
fix: 린트 에러 수정
HowToBeAHappyBoy 64c964c
ci: 워크플로우 이름 변경, bun 사용하도록 수정
HowToBeAHappyBoy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Publication 📦 | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ github.event.release.tag_name }} | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
|
|
||
| - name: Install dependencies | ||
| run: bun install --frozen-lockfile | ||
|
|
||
| - name: Verify tag matches package.json | ||
| run: | | ||
| TAG_NAME="${{ github.event.release.tag_name }}" | ||
| TAG_VERSION="${TAG_NAME#v}" | ||
| PKG_VERSION=$(jq -r .version package.json) | ||
|
|
||
| if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then | ||
| echo "Error: 태그 버전과 package.json 버전이 일치하지 않습니다." | ||
| echo "tag version: ${TAG_VERSION}" | ||
| echo "package.json version: ${PKG_VERSION}" | ||
| exit 1 | ||
| fi | ||
| echo "✅ 버전 일치 확인: ${TAG_VERSION}" | ||
|
|
||
| - name: Build package | ||
| run: | | ||
| bun run prepare | ||
| bun run build:lib | ||
|
|
||
hyoseong1994 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Publish to npm | ||
| env: | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| run: | | ||
| echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc | ||
|
|
||
| bun publish | ||
| echo "npm 배포가 완료되었습니다." | ||
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.