@@ -241,128 +241,3 @@ jobs:
241241 INPUT_PASSWORD : ${{ secrets.ES_PASSWORD }}
242242 INPUT_TOTP_SECRET : ${{ secrets.ES_TOTP_SECRET }}
243243 INPUT_CREDENTIAL_ID : ${{ secrets.WINDOWS_CREDENTIAL_ID_SIGNER }}
244-
245- # ============================================================================
246- # PR Preview Jobs (Only run on pull requests)
247- # ============================================================================
248-
249- pr-preview :
250- name : PR Preview Build
251- strategy :
252- fail-fast : true
253- matrix :
254- os : [ macos-latest, windows-latest ]
255- runs-on : ${{ matrix.os }}
256- needs : [ typechecking, tests ]
257- if : github.event_name == 'pull_request'
258- steps :
259- - uses : actions/checkout@v4
260- with :
261- fetch-depth : 0
262- fetch-tags : true
263-
264- - uses : actions/setup-node@v4
265- with :
266- node-version : 22
267- cache : ' npm'
268- cache-dependency-path : ${{ env.WORKING_DIRECTORY }}/package-lock.json
269-
270- - name : install
271- run : make install
272-
273- - name : build
274- run : node_modules/.bin/jest --detectOpenHandles --colors --runInBand --runTestsByPath scripts/build.spec.ts
275-
276- - name : Install dependencies
277- run : npm i --silent
278- working-directory : ${{ env.WORKING_DIRECTORY }}
279- env :
280- PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD : 1
281-
282- - name : Build application (development mode)
283- run : echo MODE=development && npm run build
284- working-directory : ${{ env.WORKING_DIRECTORY }}
285- env :
286- NODE_OPTIONS : " --max-old-space-size=8192"
287- MODE : development
288- VITE_SEGMENT_CREATORS_HUB_API_KEY : ${{ secrets.VITE_SEGMENT_CREATORS_HUB_API_KEY }}
289- VITE_SEGMENT_INSPECTOR_API_KEY : ${{ secrets.VITE_SEGMENT_INSPECTOR_API_KEY }}
290- VITE_ALLOWED_EXTERNAL_ORIGINS : ${{ secrets.VITE_ALLOWED_EXTERNAL_ORIGINS }}
291- SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
292- VITE_SENTRY_DSN : ${{ secrets.SENTRY_DSN }}
293-
294- - name : Generate preview version
295- id : version
296- uses : paulhatch/semantic-version@v5.4.0
297- with :
298- tag_prefix : " "
299- version_format : ${major}.${minor}.${patch}
300- major_pattern : " /^(major|breaking).+/"
301- minor_pattern : " /^(minor|feat).+/"
302- bump_each_commit : false
303- bump_each_commit_patch_pattern : " /^(patch|fix).+/"
304- search_commit_body : true
305- user_format_type : " json"
306-
307- - name : Build artifacts (no publishing)
308- run : npx electron-builder --config electron-builder.cjs --config.extraMetadata.version=${{ steps.version.outputs.version }} --publish never
309- working-directory : ${{ env.WORKING_DIRECTORY }}
310- env :
311- USE_HARD_LINKS : false
312-
313- - name : Move artifacts to upload folder
314- run : sh -c 'mkdir dist/upload && cp dist/*.dmg dist/*.exe dist/upload 2> /dev/null || :'
315- working-directory : ${{ env.WORKING_DIRECTORY }}
316-
317- - name : Upload to S3
318- id : upload
319- env :
320- AWS_ACCESS_KEY_ID : ${{ secrets.SDK_TEAM_AWS_ID }}
321- AWS_SECRET_ACCESS_KEY : ${{ secrets.SDK_TEAM_AWS_SECRET }}
322- run : |
323- npx @dcl/cdn-uploader@next \
324- --bucket ${{ secrets.SDK_TEAM_S3_BUCKET }} \
325- --local-folder ${{ env.WORKING_DIRECTORY }}/dist/upload \
326- --bucket-folder creator-hub/branch/${{ github.head_ref }}
327-
328- - name : Set download instructions (Windows)
329- if : matrix.os == 'windows-latest'
330- id : windows-instructions
331- run : |
332- echo "list<<EOF" >> $GITHUB_ENV
333- echo "[win-x64](${{ secrets.SDK_TEAM_S3_BASE_URL }}/creator-hub/branch/${{ github.head_ref }}/Decentraland%20Creator%20Hub-${{ steps.version.outputs.version }}-win-x64.exe)" >> $GITHUB_ENV
334- echo "EOF" >> $GITHUB_ENV
335-
336- - name : Set download instructions (macOS)
337- if : matrix.os == 'macos-latest'
338- id : macos-instructions
339- run : |
340- echo "list<<EOF" >> $GITHUB_ENV
341- echo "[mac-x64](${{ secrets.SDK_TEAM_S3_BASE_URL }}/creator-hub/branch/${{ github.head_ref }}/Decentraland%20Creator%20Hub-${{ steps.version.outputs.version }}-mac-x64.dmg)" >> $GITHUB_ENV
342- echo "[mac-arm64](${{ secrets.SDK_TEAM_S3_BASE_URL }}/creator-hub/branch/${{ github.head_ref }}/Decentraland%20Creator%20Hub-${{ steps.version.outputs.version }}-mac-arm64.dmg)" >> $GITHUB_ENV
343- echo "EOF" >> $GITHUB_ENV
344- content=$(cat ./.github/workflows/creator-hub-macos-instructions.md)
345- echo "macos-instructions<<EOF" >> $GITHUB_ENV
346- echo "$content" >> $GITHUB_ENV
347- echo "EOF" >> $GITHUB_ENV
348-
349- - name : Find existing comment
350- uses : peter-evans/find-comment@v1
351- id : fc
352- with :
353- issue-number : ${{ github.event.pull_request.number }}
354- comment-author : ' github-actions[bot]'
355- body-includes : Test this pull request on ${{ matrix.os }}
356-
357- - name : Create or update comment
358- uses : peter-evans/create-or-update-comment@v1
359- with :
360- comment-id : ${{ steps.fc.outputs.comment-id }}
361- issue-number : ${{ github.event.pull_request.number }}
362- body : |
363- # Test this pull request on ${{ matrix.os }}
364- #### Download the correct version for your architecture:
365- ${{ env.list }}
366-
367- ${{ env.macos-instructions }}
368- edit-mode : replace
0 commit comments