-
Notifications
You must be signed in to change notification settings - Fork 47
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
Integrate VSCode extension release to GH Action #2497
Integrate VSCode extension release to GH Action #2497
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2497 +/- ##
=======================================
Coverage 82.28% 82.28%
=======================================
Files 143 143
Lines 2981 2981
Branches 918 918
=======================================
Hits 2453 2453
Misses 497 497
Partials 31 31 ☔ View full report in Codecov by Sentry. |
11921d4
to
148a074
Compare
package.json
Outdated
@@ -19,6 +19,7 @@ | |||
"update-snapshot": "yarn workspace @channel.io/bezier-react update-snapshot", | |||
"changeset": "changeset", | |||
"postinstall": "husky install", | |||
"publish-vscode": "yarn workspace bezier-vscode publish --no-dependencies", |
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.
자주 실행하는 커맨드라 alias 용도로 편리하게 사용하기 위한게 아니라면(이 기준이 좀 애매하긴 하지만) 각 패키지 종속적인 커맨드는 해당 패키지에 위치해있는게 좋을 거 같아요
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.
그렇네요! bezier-vscode 패키지의 커맨드를 직접 실행하도록 변경했습니다
.github/workflows/release.yml
Outdated
|
||
- name: Release VSCode extension | ||
continue-on-error: true | ||
run: npm i -g vsce && yarn publish-vscode |
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.
질문) npx
는 사용할 수 없나요? 똑같으려나 싶기도...
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.
npx 로 하는게 의미가 정확하겠네요
.github/workflows/release.yml
Outdated
|
||
- name: Release VSCode extension | ||
continue-on-error: true | ||
run: npm i -g vsce && yarn publish-vscode |
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.
run: npm i -g vsce && yarn publish-vscode | |
run: npm i -g vsce && yarn workspace bezier-vscode publish |
마이너 제안
148a074
to
6c5c0b4
Compare
.github/workflows/release.yml
Outdated
@@ -42,6 +42,6 @@ jobs: | |||
|
|||
- name: Release VSCode extension | |||
continue-on-error: true | |||
run: npm i -g vsce && yarn publish-vscode | |||
run: npx vsce && yarn publish-vscode |
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.
npx 명령어 수행 시점에 vsce가 일회용으로 설치되기만 하고 명령어가 실행은 안되어서 실패할 거에요
이런 식으로 처리하거나, 기존처럼 전역으로 설치해야겠네요
(번외로 npx
사용한다면 대신 yarn dlx
써도 될 거 같습니다. 차이는 거의 없는 거 같아요. 캐시를 활용하는 것도 아니라서)
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.
아.. 그렇네요 깃헙에서 use case 찾는거 꿀팁이네요!
packages/bezier-vscode/package.json
Outdated
@@ -60,7 +60,7 @@ | |||
"typecheck": "tsc --noEmit", | |||
"clean": "rm -rf dist", | |||
"vscode:prepublish": "yarn build", | |||
"publish": "vsce publish" | |||
"publish": "vsce publish --no-dependencies" |
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.
yarn dlx vsce publish --no-dependencies
vsce
패키지를 사용한다는 점을 패키지 외부에서 몰라도 되어서 이런 식이 더 좋을 거 같아요
…e-on-error property
6693530
to
9f577e8
Compare
Self Checklist
Related Issue
bezier-vscode
pacakge #2485Summary
bezier-vscode
배포를 release.yml 에 추가해서 changesets PR을 머지하면 자동으로 배포되도록 합니다.vsce publish
실행시키면그대로 진행하시곘습니까? [y/N]
을 물어보네요.Details
VSCE_PAT
: VSCode 퍼블리셔의 토큰입니다. 레포 시크릿에 추가헀습니다.--no-dependencies
: yarn 버전 이슈때문에 안넣어주면 에러가 뜹니다 (Support yarn v2 microsoft/vscode-vsce#517)continue-on-error
: changesets PR 에 VSCode 관련 변경 사항이 없을 경우에 현재 배포된 버전과 같은 버전으로 배포하게 되는데 이때 워닝이 아니라 에러를 뱉기 떄문에 true 로 했습니다.Breaking change? (Yes/No)
References
vsce publish --help