@@ -47,18 +47,22 @@ jobs:
4747 with :
4848 fetch-depth : 0
4949 token : ${{ secrets.GH_TOKEN }}
50- - name : Install Nix
51- uses : DeterminateSystems/nix-installer-action@v10
50+ - uses : pnpm/action-setup@v4
51+ with :
52+ run_install : false
53+ - uses : actions/setup-node@v4
54+ id : cache
55+ with :
56+ node-version-file : ' .node-version'
57+ cache : ' pnpm'
58+ registry-url : ' https://registry.npmjs.org'
5259
53- - name : Install Dependencies
54- run : |
55- nix develop --command bash -c '
56- npm install -g npm@latest
57- pnpm install --frozen-lockfile
58- '
60+ - name : Update npm
61+ run : npm install -g npm@latest
62+
63+ - run : pnpm install --frozen-lockfile
5964
60- - name : Start Nx Cloud CI Run
61- run : nix develop --command bash -c 'NX_CLOUD_DISTRIBUTED_EXECUTION=false pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --with-env-vars="CODECOV_TOKEN"'
65+ - run : pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --with-env-vars="CODECOV_TOKEN"
6266
6367 - name : Cache Playwright browsers
6468 uses : actions/cache@v4
@@ -68,13 +72,14 @@ jobs:
6872 restore-keys : |
6973 ${{ runner.os }}-playwright-
7074
71- - name : Install Browsers, Configure Pnpm, and Run Nx Affected
72- run : |
73- nix develop --command bash -c '
74- pnpm exec playwright install
75- pnpm config set store-dir $PNPM_CACHE_FOLDER
76- pnpm exec nx affected -t build lint test e2e-ci
77- '
75+ - run : pnpm exec playwright install
76+
77+ - uses : nrwl/nx-set-shas@v4
78+
79+ - name : setup pnpm config
80+ run : pnpm config set store-dir $PNPM_CACHE_FOLDER
81+
82+ - run : pnpm exec nx affected -t build lint test e2e-ci
7883
7984 - uses : actions/upload-artifact@v4
8085 if : ${{ !cancelled() }}
8994 uses : changesets/action@v1
9095 id : changesets
9196 with :
92- publish : nix develop --command bash -c ' pnpm ci:release'
93- version : nix develop --command bash -c ' pnpm ci:version'
97+ publish : pnpm ci:release
98+ version : pnpm ci:version
9499 title : Release PR
95100 branch : main
96101 commit : ' chore: version-packages'
99104 HOME : ${{ github.workspace }}
100105 GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
101106
107+ - run : pnpm pkg-pr-new publish './packages/*' './packages/sdk-effects/*' --packageManager=pnpm --comment=off
108+ if : steps.changesets.outputs.published == 'false'
109+
102110 - name : Send GitHub Action data to a Slack workflow
103111 if : steps.changesets.outputs.published == 'true'
104112@@ -108,21 +116,18 @@ jobs:
108116 webhook-type : webhook-trigger
109117 payload : steps.changesets.outputs.publishedPackages
110118
111- - name : Preview Publish
112- if : steps.changesets.outputs.published == 'false'
113-
114- run : nix develop --command bash -c 'pnpm pkg-pr-new publish './packages/*' './packages/sdk-effects/*' --packageManager=pnpm'
115-
116119 - uses : codecov/codecov-action@v5
117120 with :
118121 files : ./packages/**/coverage/*.xml
119122 token : ${{ secrets.CODECOV_TOKEN }}
120123
121124 - name : Ensure builds run
122- run : nix develop --command bash -c 'pnpm nx run-many -t build'
125+ run : pnpm nx run-many -t build
126+ env :
127+ NX_CLOUD_DISTRIBUTED_EXECUTION : false
123128
124129 - name : Build docs
125- run : nix develop --command bash -c ' pnpm generate-docs'
130+ run : pnpm generate-docs
126131
127132 - name : Publish api docs
128133 if : steps.changesets.outputs.published == 'true'
@@ -142,14 +147,12 @@ jobs:
142147
143148 - name : Calculate baseline bundle sizes
144149 run : |
145- nix develop --command bash -c '
146- chmod +x ./scripts/bundle-sizes.sh
147- rm -f previous_sizes.json
148- echo "📊 Calculating fresh baseline bundle sizes for main branch"
149- ./scripts/bundle-sizes.sh
150- echo "✅ Baseline bundle sizes calculated"
151- cat previous_sizes.json
152- '
150+ chmod +x ./scripts/bundle-sizes.sh
151+ rm -f previous_sizes.json
152+ echo "📊 Calculating fresh baseline bundle sizes for main branch"
153+ ./scripts/bundle-sizes.sh
154+ echo "✅ Baseline bundle sizes calculated"
155+ cat previous_sizes.json
153156
154157 - name : Upload baseline bundle sizes
155158 uses : actions/upload-artifact@v4
@@ -174,23 +177,20 @@ jobs:
174177 with :
175178 fetch-depth : 0
176179 ref : ${{ inputs.branch }}
180+ - uses : pnpm/action-setup@v4
181+ with :
182+ run_install : false
183+ - uses : actions/setup-node@v4
184+ with :
185+ node-version-file : ' .node-version'
186+ cache : ' pnpm'
177187
178- - name : Install Nix
179- uses : DeterminateSystems/nix-installer-action@v10
188+ - name : Update npm
189+ run : npm install -g npm@latest
180190
181- - name : Configure Nix Cache
182- uses : cachix/cachix-action@v14
183- with :
184- name : ping-javascript-sdk # Matches the cache name in ci.yml
185- authToken : ' ${{ secrets.CACHIX_AUTH_TOKEN }}'
191+ - run : pnpm install --frozen-lockfile
186192
187- - name : Install Dependencies and Start CI Run
188- run : |
189- nix develop --command bash -c '
190- npm install -g npm@latest
191- pnpm install --frozen-lockfile
192- pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --with-env-vars="CODECOV_TOKEN"
193- '
193+ - run : pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --with-env-vars="CODECOV_TOKEN"
194194
195195 - name : Cache Playwright browsers
196196 uses : actions/cache@v4
@@ -200,13 +200,16 @@ jobs:
200200 restore-keys : |
201201 ${{ runner.os }}-playwright-
202202
203- - name : Install Browsers, Configure Pnpm, and Run Nx
204- run : |
205- nix develop --command bash -c '
206- pnpm exec playwright install
207- pnpm config set store-dir $PNPM_CACHE_FOLDER
208- pnpm exec nx run-many -t build test e2e-ci
209- '
203+ - run : pnpm exec playwright install
204+
205+ - uses : nrwl/nx-set-shas@v4
206+ with :
207+ main-branch-name : main
208+
209+ - name : setup pnpm config
210+ run : pnpm config set store-dir $PNPM_CACHE_FOLDER
211+
212+ - run : pnpm exec nx run-many -t build test e2e-ci
210213
211214 - uses : actions/upload-artifact@v4
212215 if : ${{ !cancelled() }}
@@ -216,11 +219,11 @@ jobs:
216219 ./**/.playwright/**
217220 retention-days : 30
218221
219- - name : Version and Publish Packages
220- run : |
221- nix develop --command bash -c '
222- pnpm changeset version --snapshot ${{ inputs.prerelease }}
223- pnpm publish -r --tag ${{ inputs.dist_tag }} --no-git-checks --access ${{ inputs.access }}
224- '
222+ - name : Version Packages as prerelease
223+ run : pnpm changeset version --snapshot ${{ inputs.prerelease }}
225224 env :
226225 GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
226+
227+ # The actual npm publish that must occur in the authorized file
228+ - name : Publish packages with dist-tag
229+ run : pnpm publish -r --tag ${{ inputs.dist_tag }} --no-git-checks --access ${{ inputs.access }}
0 commit comments