Skip to content

Commit

Permalink
👷 Preview builds using pkg.pr.new
Browse files Browse the repository at this point in the history
The GitHub Application `pkg.pr.new` is responsible to help into previewing packages as they get developped. It could be seen as a possible alternative to the current codesandbox option that we have been using until now.

This PR aims into giving it a try to see how it behaves against our monorepo.
  • Loading branch information
dubzzz authored Nov 1, 2024
1 parent 837548f commit 0ddde31
Show file tree
Hide file tree
Showing 3 changed files with 405 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,35 @@ jobs:
run: yarn unpack:all
- name: Typecheck
run: yarn workspaces foreach --all -pvi run typecheck
preview:
name: 'Preview'
needs:
- warmup_yarn_cache
- production_packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Using Node v20.x
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '20.x'
cache: 'yarn'
cache-dependency-path: yarn.lock
check-latest: true
- name: Install dependencies
env:
YARN_ENABLE_OFFLINE_MODE: 1
YARN_ENABLE_HARDENED_MODE: 0
run: yarn install --immutable --immutable-cache --mode=skip-build
- name: Download production packages
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: bundles
path: packages/
- name: Unpack production packages
run: yarn unpack:all
- name: Preview
run: yarn dlx pkg-pr-new publish --compact './packages/*'
test:
name: 'Test'
needs:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"globals": "^15.11.0",
"pkg-pr-new": "^0.0.30",
"prettier": "3.3.3",
"publint": "^0.2.12",
"typescript": "~5.6.3",
Expand Down
Loading

0 comments on commit 0ddde31

Please sign in to comment.