-
-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): support pkg.pr.new (#7757)
* init * test * finish * chore: follow suggestions * fix * fix
- Loading branch information
Showing
4 changed files
with
105 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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,91 @@ | ||
# https://github.com/stackblitz-labs/pkg.pr.new | ||
name: Preview Commit | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
get-runner-labels: | ||
name: Get Runner Labels | ||
uses: ./.github/workflows/get-runner-labels.yml | ||
with: | ||
force-use-github-runner: true | ||
|
||
check-changed: | ||
runs-on: ubuntu-latest | ||
name: Check Changed | ||
outputs: | ||
changed: ${{ steps.filter.outputs.changed == 'true' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dorny/paths-filter@v3 | ||
id: filter | ||
with: | ||
predicate-quantifier: "every" | ||
filters: | | ||
changed: | ||
- "crates" | ||
- "packages/rspack/**" | ||
- "packages/rspack-cli/**" | ||
build: | ||
needs: [get-runner-labels] | ||
strategy: | ||
fail-fast: false # Build and test everything so we can look at all the errors | ||
matrix: | ||
array: | ||
- target: x86_64-unknown-linux-gnu | ||
runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }} | ||
- target: aarch64-unknown-linux-gnu | ||
runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }} | ||
- target: x86_64-unknown-linux-musl | ||
runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }} | ||
- target: aarch64-unknown-linux-musl | ||
runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }} | ||
- target: i686-pc-windows-msvc | ||
runner: ${{ needs.get-runner-labels.outputs.WINDOWS_RUNNER_LABELS }} | ||
- target: x86_64-pc-windows-msvc | ||
runner: ${{ needs.get-runner-labels.outputs.WINDOWS_RUNNER_LABELS }} | ||
- target: aarch64-pc-windows-msvc | ||
runner: ${{ needs.get-runner-labels.outputs.WINDOWS_RUNNER_LABELS }} | ||
- target: x86_64-apple-darwin | ||
runner: ${{ needs.get-runner-labels.outputs.MACOS_RUNNER_LABELS }} | ||
- target: aarch64-apple-darwin | ||
runner: ${{ needs.get-runner-labels.outputs.MACOS_RUNNER_LABELS }} | ||
uses: ./.github/workflows/reusable-build.yml | ||
with: | ||
target: ${{ matrix.array.target }} | ||
runner: ${{ matrix.array.runner }} | ||
profile: "release-prod" | ||
test: false | ||
|
||
publish: | ||
if: github.repository == 'web-infra-dev/rspack' | ||
name: Pkg Preview | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
- check-changed | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Pnpm Cache | ||
uses: ./.github/actions/pnpm-cache | ||
|
||
- name: Download artifacts | ||
uses: actions/[email protected] | ||
with: | ||
path: artifacts | ||
|
||
- name: Build node packages | ||
run: pnpm run build:js | ||
|
||
- name: Move artifacts | ||
run: node scripts/build-npm.cjs | ||
|
||
- name: Show binding packages | ||
run: ls -R npm | ||
|
||
- name: Release | ||
if: needs.check-changed.outputs.changed == 'true' | ||
run: npx pkg-pr-new publish --compact --pnpm './npm/*' './crates/node_binding' './packages/rspack' './packages/rspack-cli' |
This file contains 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
b2ee5d1
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.
📝 Benchmark detail: Open
b2ee5d1
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.
📝 Ran ecosystem CI: Open