-
-
Notifications
You must be signed in to change notification settings - Fork 3
deprecated 워크플로우 구현 #702
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
deprecated 워크플로우 구현 #702
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Bundle ReportChanges will increase total bundle size by 18 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: daleui-bundle-esmAssets Changed:
|
6f8d5aa to
df6562e
Compare
df6562e to
16165a2
Compare
78fb035 to
8bf9cc1
Compare
DaleSeo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oven-sh/setup-bun@v2 액션만 제거해주시면 될 것 같습니다.
sounmind
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
github 봇이 자동으로 달아놓은 코멘트들은 해결하지 않아도 되나요?
.github/workflows/deprecation.yml
Outdated
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| run: | | ||
| PACKAGE_NAME=$(jq -r .name package.json) | ||
| npm deprecate "$PACKAGE_NAME@${{ inputs.version }}" "${{ inputs.reason }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 이런 워크플로우는 작성해보지 않아서 잘 모르겠지만, 제가 알아보기로는 npm deprecate 하기 전에 npm view package@version을 호출하면 해당 버전이 실제로 존재하는지 사전에 검증할 수 있다고 합니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그런 검증이 굳이 필요할까요? 버전이 없으면 npm deprecate가 버전이 없다는 메시지와 함께 실패할 것입니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hyoseong1994 직접 실행까지 해서 검증해주셔서 감사합니다. 버전이 없다면 실패 메시지를 던지는 게 바람직한 워크플로우라고 생각해요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
작업완료했습니다 확인하시고 다른 의견있으시면 피드백 부탁드립니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hyoseong1994 님, 앞으로 승인한 PR은 저한테 다시 확인 안 받으셔도 됩니다. 다시 확인 받으실 만큼 추가 변경이 있을 때는 🔄 버튼 눌러서 명시적으로 요청해주세용~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 알겠습니다! 다음부터는 🔄 로 요청하겠습니다.
c5e937c to
c78c8e0
Compare
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Validate version format | ||
| run: | | ||
| VERSION="${{ inputs.version }}" | ||
| if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
| echo "❌ Invalid version format: $VERSION" | ||
| echo "Version must be in format: X.Y.Z (e.g., 1.2.3)" | ||
| exit 1 | ||
| fi | ||
|
|
||
| - uses: actions/checkout@v6 | ||
| - name: Get package information | ||
| id: package-info | ||
| run: | | ||
| echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
| PACKAGE_NAME=$(jq -r .name package.json) | ||
| echo "package_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Validate version exists in npm registry | ||
| id: validate-version | ||
| run: | | ||
| NPM_OUTPUT=$(npm view "${{ steps.package-info.outputs.package_name }}@${{ inputs.version }}" 2>&1) || { | ||
| echo "$NPM_OUTPUT" | grep -q "404" && echo "❌ Version does not exist in npm registry" | ||
| exit 1 | ||
| } | ||
|
|
||
| - name: Deprecate npm package version | ||
| run: | | ||
| echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
| npm deprecate "${{ steps.package-info.outputs.package_name }}@${{ inputs.version }}" "${{ inputs.reason }}" |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
31017e5 to
2e6949c
Compare
|
deprecated 워크플로우에 대해 잘 몰라서 cursor에 물어보며 코드리뷰를 했는데 큰 문제 없는 것 같습니다! |

변경 사항
목적
리뷰어에게
setup-node@v6를 사용하였습니다테스트 방법
act를 이용해 테스트를 진행했으며, 개인 레포지토리에 배포한 라이브러리를 대상으로 했습니다.
package.json의 name을 변경하고, 로컬 secret에 npm 토큰을 별도로 설정하여 테스트했습니다.개인 레포에서 deprecated 테스트 진행했습니다.
PR 작성자 체크 리스트