-
-
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 3 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,44 @@ | ||
| name: Npm Publish | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
DaleSeo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| with: | ||
| fetch-depth: 0 | ||
DaleSeo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ref: ${{ github.event.release.tag_name }} | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
|
|
||
| - name: Install dependencies | ||
| run: bun install --frozen-lockfile | ||
|
|
||
| - name: Build package | ||
| run: | | ||
| bun run prepare | ||
| bun run build | ||
|
||
|
|
||
| - name: Publish to npm | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| run: | | ||
| if [ -z "${NODE_AUTH_TOKEN}" ]; then | ||
| echo "Error: NPM_TOKEN이 설정되지 않았습니다." | ||
| exit 1 | ||
| fi | ||
| echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc | ||
hyoseong1994 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| TAG_NAME="${{ github.event.release.tag_name }}" | ||
| VERSION=${TAG_NAME#v} | ||
| echo "버전 ${VERSION} 배포를 시작합니다..." | ||
|
|
||
| npm publish --access public | ||
DaleSeo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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.