Skip to content

Commit d862684

Browse files
committed
install @dcl/inspector@branch
1 parent 488da45 commit d862684

3 files changed

Lines changed: 128 additions & 125 deletions

File tree

.github/workflows/ci.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,3 +562,127 @@ jobs:
562562
run: |
563563
echo "❌ Local package dependencies detected! These must be fixed before merging."
564564
exit 1
565+
566+
# ============================================================================
567+
# PR Preview Jobs (Only run on pull requests)
568+
# ============================================================================
569+
570+
pr-preview:
571+
name: PR Preview Build
572+
strategy:
573+
matrix:
574+
os: [ macos-latest, windows-latest ]
575+
runs-on: ${{ matrix.os }}
576+
needs: [ build ]
577+
if: github.event_name == 'pull_request'
578+
env:
579+
WORKING_DIRECTORY: packages/@dcl/creator-hub
580+
steps:
581+
- uses: actions/checkout@v4
582+
with:
583+
fetch-depth: 0
584+
fetch-tags: true
585+
586+
- uses: actions/setup-node@v4
587+
with:
588+
node-version: 22
589+
cache: 'npm'
590+
591+
- name: Install @dcl/inspector@branch package
592+
run: npm install "${{ secrets.SDK_TEAM_S3_BASE_URL }}/${{ needs.build.outputs.decentraland_inspector_s3_bucket_key }}"
593+
working-directory: ${{ env.WORKING_DIRECTORY }}
594+
env:
595+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
596+
597+
- name: Install dependencies
598+
run: npm i --silent
599+
working-directory: ${{ env.WORKING_DIRECTORY }}
600+
env:
601+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
602+
603+
- name: Build application (development mode)
604+
run: echo MODE=development && npm run build
605+
working-directory: ${{ env.WORKING_DIRECTORY }}
606+
env:
607+
NODE_OPTIONS: "--max-old-space-size=8192"
608+
MODE: development
609+
VITE_SEGMENT_CREATORS_HUB_API_KEY: ${{ secrets.VITE_SEGMENT_CREATORS_HUB_API_KEY }}
610+
VITE_SEGMENT_INSPECTOR_API_KEY: ${{ secrets.VITE_SEGMENT_INSPECTOR_API_KEY }}
611+
VITE_ALLOWED_EXTERNAL_ORIGINS: ${{ secrets.VITE_ALLOWED_EXTERNAL_ORIGINS }}
612+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
613+
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
614+
615+
- name: Generate preview version
616+
id: version
617+
uses: paulhatch/semantic-version@v5.4.0
618+
with:
619+
tag_prefix: ""
620+
version_format: ${major}.${minor}.${patch}
621+
major_pattern: "/^(major|breaking).+/"
622+
minor_pattern: "/^(minor|feat).+/"
623+
bump_each_commit: false
624+
bump_each_commit_patch_pattern: "/^(patch|fix).+/"
625+
search_commit_body: true
626+
user_format_type: "json"
627+
628+
- name: Build artifacts (no publishing)
629+
run: npx electron-builder --config electron-builder.cjs --config.extraMetadata.version=${{ steps.version.outputs.version }} --publish never
630+
working-directory: ${{ env.WORKING_DIRECTORY }}
631+
env:
632+
USE_HARD_LINKS: false
633+
634+
- name: Move artifacts to upload folder
635+
run: sh -c 'mkdir dist/upload && cp dist/*.dmg dist/*.exe dist/upload 2> /dev/null || :'
636+
working-directory: ${{ env.WORKING_DIRECTORY }}
637+
638+
- name: Upload to S3
639+
id: upload
640+
env:
641+
AWS_ACCESS_KEY_ID: ${{ secrets.SDK_TEAM_AWS_ID }}
642+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SDK_TEAM_AWS_SECRET }}
643+
run: |
644+
npx @dcl/cdn-uploader@next --bucket "${{ secrets.SDK_TEAM_S3_BUCKET }}" --local-folder "dist/upload" --bucket-folder "creator-hub/branch/${{ github.head_ref }}"
645+
646+
- name: Set specific windows instructions
647+
if: ${{ github.event.pull_request.number && matrix.os == 'windows-latest' }}
648+
id: windows-instructions
649+
run: |
650+
echo "list<<EOF" >> $GITHUB_ENV
651+
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
652+
echo "EOF" >> $GITHUB_ENV
653+
654+
- name: Set download instructions (macOS)
655+
if: ${{ github.event.pull_request.number && matrix.os == 'macos-latest' }}
656+
id: macos-instructions
657+
run: |
658+
echo "list<<EOF" >> $GITHUB_ENV
659+
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
660+
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
661+
echo "EOF" >> $GITHUB_ENV
662+
content=$(cat ./.github/workflows/creator-hub-macos-instructions.md)
663+
echo "macos-instructions<<EOF" >> $GITHUB_ENV
664+
echo "$content" >> $GITHUB_ENV
665+
echo "EOF" >> $GITHUB_ENV
666+
667+
- name: Find existing comment
668+
if: ${{ github.event.pull_request.number }}
669+
uses: peter-evans/find-comment@v1
670+
id: fc
671+
with:
672+
issue-number: ${{ github.event.pull_request.number }}
673+
comment-author: 'github-actions[bot]'
674+
body-includes: Test this pull request on ${{ matrix.os }}
675+
676+
- name: Create or update comment
677+
if: ${{ github.event.pull_request.number }}
678+
uses: peter-evans/create-or-update-comment@v1
679+
with:
680+
comment-id: ${{ steps.fc.outputs.comment-id }}
681+
issue-number: ${{ github.event.pull_request.number }}
682+
body: |
683+
# Test this pull request on ${{ matrix.os }}
684+
#### Download the correct version for your architecture:
685+
${{ env.list }}
686+
687+
${{ env.macos-instructions }}
688+
edit-mode: replace

.github/workflows/creator-hub.yml

Lines changed: 0 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -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

packages/@dcl/creator-hub/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"name": "Decentraland Foundation",
1010
"url": "https://decentraland.org"
1111
},
12+
"repository": {
13+
"type": "git",
14+
"url": "https://github.com/decentraland/js-sdk-toolchain.git"
15+
},
1216
"main": "packages/main/dist/index.js",
1317
"scripts": {
1418
"build": "npm run build:main && npm run build:preload && npm run build:renderer",

0 commit comments

Comments
 (0)