-
Notifications
You must be signed in to change notification settings - Fork 407
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
chore: add pkg.pr.new workflow #5273
base: master
Are you sure you want to change the base?
Changes from all commits
8fdbdfd
a871e55
1b5f470
59ac8a2
3fb4c46
13d54d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Publish Playground Preview, Please! | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.18.1' | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Publish preview | ||
run: yarn exec pkg-pr-new -- publish './packages/@lwc/*' './packages/lwc' --template './playground' | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the token require any particular perms? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems pretty basic to me. I think it even runs without the token, it just won't provide the comment, and won't update when new commits are pushed. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,7 @@ | |
"lint-staged": "^15.4.3", | ||
"magic-string": "^0.30.17", | ||
"nx": "20.4.4", | ||
"pkg-pr-new": "^0.0.40", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Had to add this if we're using yarn exec instead of dlx:
|
||
"prettier": "^3.5.1", | ||
"rollup": "^4.34.8", | ||
"terser": "^5.39.0", | ||
|
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.
Since we're not going to use the preview for every PR, should we create one for every PR? Or should we use label/comment as a trigger?
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.
I would just run on every PR, it won't run without approval anyway, but it can be narrowed down.
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.
Here's some example workflows: https://github.com/stackblitz-labs/pkg.pr.new?tab=readme-ov-file#examples