@@ -563,194 +563,12 @@ jobs:
563563 echo "❌ Local package dependencies detected! These must be fixed before merging."
564564 exit 1
565565
566- # ============================================================================
567- # PR Preview Jobs (Only run on pull requests)
568- # ============================================================================
569-
570- pr-preview :
571- name : Creator Hub Build
572- needs : [build]
573- strategy :
574- fail-fast : true
575- matrix :
576- os : [ macos-latest, windows-latest ]
577- runs-on : ${{ matrix.os }}
578- env :
579- WORKING_DIRECTORY : packages/@dcl/creator-hub
580-
566+ trigger-creator-hub-workflow :
567+ needs : build
568+ runs-on : ubuntu-latest
581569 steps :
582- - uses : actions/checkout@v4
583- with :
584- fetch-depth : 0
585- fetch-tags : true
586-
587- - uses : actions/setup-node@v4
588- with :
589- node-version : 22
590- cache : ' npm'
591-
592- - name : Install @dcl/inspector@branch package
593- run : npm install "${{ secrets.SDK_TEAM_S3_BASE_URL }}/${{ needs.build.outputs.decentraland_inspector_s3_bucket_key }}"
594- working-directory : ${{ env.WORKING_DIRECTORY }}
595- env :
596- PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD : 1
597-
598- - name : ' Install dependencies'
599- run : npm ci
600- working-directory : ${{ env.WORKING_DIRECTORY }}
601- env :
602- PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD : 1
603-
604- - name : ' Build'
605- run : echo MODE=$MODE && npm run build
606- working-directory : ${{ env.WORKING_DIRECTORY }}
607- env :
608- NODE_OPTIONS : " --max-old-space-size=8192"
609- MODE : ${{ !github.event.pull_request.number && 'production' || 'development' }}
610- VITE_SEGMENT_CREATORS_HUB_API_KEY : ${{ secrets.VITE_SEGMENT_CREATORS_HUB_API_KEY }}
611- VITE_SEGMENT_INSPECTOR_API_KEY : ${{ secrets.VITE_SEGMENT_INSPECTOR_API_KEY }}
612- VITE_ALLOWED_EXTERNAL_ORIGINS : ${{ secrets.VITE_ALLOWED_EXTERNAL_ORIGINS }}
613- # Sentry AUTH Token
614- SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
615- VITE_SENTRY_DSN : ${{ secrets.SENTRY_DSN }}
616-
617- - name : Get latest Creator Hub release version (or fallback to last version before migration to monorepo)
618- id : latest_version
619- shell : bash
570+ - name : Trigger creator-hub workflow
620571 run : |
621- TAG=$(gh release list --limit 100 | grep '^creator-hub-v' | head -n 1 | awk '{print $1}' || true)
622- if [[ -z "$TAG" ]]; then
623- echo "No previous creator-hub release found. Defaulting to 0.21.1"
624- VERSION="0.21.1"
625- else
626- VERSION=${TAG#"creator-hub-v"}
627- fi
628- echo "version=$VERSION" >> $GITHUB_OUTPUT
572+ gh workflow run "creator-hub.yml" -f inspector-package-url="${{ needs.build.outputs.decentraland_inspector_s3_bucket_key }}"
629573 env :
630574 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
631-
632- - name : Bump latest release version (patch)
633- id : new_version
634- shell : bash
635- run : |
636- VERSION=${{ steps.latest_version.outputs.version }}
637- IFS='.' read -r MAJOR MINOR PATCH <<< "$VERSION"
638- PATCH=$((PATCH + 1))
639- NEW_VERSION="$MAJOR.$MINOR.$PATCH"
640- echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
641-
642- - name : Create custom tag before build
643- if : github.ref == 'refs/heads/main' && !github.event.pull_request
644- shell : bash
645- run : |
646- git config user.name "github-actions[bot]"
647- git config user.email "github-actions[bot]@users.noreply.github.com"
648- git tag creator-hub-v${{ steps.new_version.outputs.new_version }}
649- git push origin creator-hub-v${{ steps.new_version.outputs.new_version }}
650-
651- # Download 'SSLcom/esigner-codesign' to a folder called 'esigner-codesign' inside creator-hub package
652- - name : Checkout esigner-codesign repository (Windows)
653- if : ${{github.ref == 'refs/heads/main' && matrix.os == 'windows-latest' && !github.event.pull_request.number}}
654- uses : actions/checkout@v3
655- with :
656- repository : ' SSLcom/esigner-codesign'
657- path : ${{ env.WORKING_DIRECTORY }}/esigner-codesign
658-
659- - name : Compile artifacts ${{ github.event.pull_request.number && ' ' || 'and upload them to github release' }}
660- # I use this action because it is capable of retrying multiple times if there are any issues with the distribution server
661- uses : nick-fields/retry@v3
662- with :
663- timeout_minutes : 60
664- max_attempts : 6
665- retry_wait_seconds : 15
666- retry_on : error
667- shell : ' bash'
668- command : npx electron-builder --project ${{ env.WORKING_DIRECTORY }} --config electron-builder.cjs --config.extraMetadata.version=${{ steps.new_version.outputs.new_version }} ${{ matrix.os == 'macos-latest' && format('--config.mac.notarize={0}', true) || '' }} --publish ${{ github.event.pull_request.number && 'never' || 'always' }}
669- env :
670- # Disable hard links to avoid issues with npm
671- USE_HARD_LINKS : false
672- # Code Signing params
673- # See https://www.electron.build/code-signing
674- CSC_LINK : ${{ secrets.MACOS_CSC_LINK }}
675- CSC_KEY_PASSWORD : ${{ secrets.MACOS_CSC_KEY_PASSWORD }}
676- # Notarization params
677- # See https://www.electron.build/configuration/mac#NotarizeNotaryOptions
678- APPLE_ID : ${{ secrets.MACOS_NOTARIZATION_APPLE_ID }}
679- APPLE_TEAM_ID : ${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}
680- APPLE_APP_SPECIFIC_PASSWORD : ${{ secrets.MACOS_NOTARIZATION_PWD }}
681- # Publishing artifacts
682- GH_TOKEN : ${{ secrets.github_token }} # GitHub token, automatically provided (No need to define this secret in the repo settings)
683- EP_PRE_RELEASE : true # Publish as pre-release
684- # The following are the parameters required by the esigner-codesign action to work, we must explicitly pass in even the optional ones since we're not using the action directly, but from the checked out repo
685- CODE_SIGN_SCRIPT_PATH : ${{ matrix.os == 'windows-latest' && format('{0}\\esigner-codesign\\dist\\index.js', github.workspace) || '' }}
686- INPUT_COMMAND : " sign"
687- INPUT_FILE_PATH : " ${{ github.workspace }}\\ dist\\ Decentraland Creator Hub-${{ steps.new_version.outputs.new_version }}-win-x64.exe"
688- INPUT_OVERRIDE : " true"
689- INPUT_MALWARE_BLOCK : " false"
690- INPUT_CLEAN_LOGS : " false"
691- INPUT_JVM_MAX_MEMORY : " 1024M"
692- INPUT_ENVIRONMENT_NAME : " PROD"
693- INPUT_USERNAME : ${{ secrets.ES_USERNAME }}
694- INPUT_PASSWORD : ${{ secrets.ES_PASSWORD }}
695- INPUT_TOTP_SECRET : ${{ secrets.ES_TOTP_SECRET }}
696- INPUT_CREDENTIAL_ID : ${{ secrets.WINDOWS_CREDENTIAL_ID_SIGNER }}
697-
698- - name : Move artifacts to upload folder
699- if : ${{ github.event.pull_request.number }}
700- working-directory : ${{ env.WORKING_DIRECTORY }}
701- run : sh -c 'mkdir dist/upload && cp dist/*.dmg dist/*.exe dist/upload 2> /dev/null || :'
702-
703- - name : Upload to S3
704- if : ${{ github.event.pull_request.number }}
705- id : upload
706- working-directory : ${{ env.WORKING_DIRECTORY }}
707- env :
708- AWS_ACCESS_KEY_ID : ${{ secrets.SDK_TEAM_AWS_ID }}
709- AWS_SECRET_ACCESS_KEY : ${{ secrets.SDK_TEAM_AWS_SECRET }}
710- run : |
711- npx @dcl/cdn-uploader@next --bucket ${{ secrets.SDK_TEAM_S3_BUCKET }} --local-folder dist/upload --bucket-folder creator-hub/branch/${{ github.head_ref }}
712-
713- - name : Set specific windows instructions
714- if : ${{ github.event.pull_request.number && matrix.os == 'windows-latest' }}
715- id : windows-instructions
716- shell : bash
717- run : |
718- echo "list<<EOF" >> $GITHUB_ENV
719- echo "[win-x64](${{ secrets.SDK_TEAM_S3_BASE_URL }}/creator-hub/branch/${{ github.head_ref }}/Decentraland%20Creator%20Hub-${{ steps.new_version.outputs.new_version }}-win-x64.exe)" >> $GITHUB_ENV
720- echo "EOF" >> $GITHUB_ENV
721-
722- - name : Set specific macos instructions
723- if : ${{ github.event.pull_request.number && matrix.os == 'macos-latest' }}
724- id : macos-instructions
725- run : |
726- echo "list<<EOF" >> $GITHUB_ENV
727- echo "[mac-x64](${{ secrets.SDK_TEAM_S3_BASE_URL }}/creator-hub/branch/${{ github.head_ref }}/Decentraland%20Creator%20Hub-${{ steps.new_version.outputs.new_version }}-mac-x64.dmg)" >> $GITHUB_ENV
728- echo "[mac-arm64](${{ secrets.SDK_TEAM_S3_BASE_URL }}/creator-hub/branch/${{ github.head_ref }}/Decentraland%20Creator%20Hub-${{ steps.new_version.outputs.new_version }}-mac-arm64.dmg)" >> $GITHUB_ENV
729- echo "EOF" >> $GITHUB_ENV
730- content=$(cat ./.github/workflows/creator-hub-macos-instructions.md)
731- echo "macos-instructions<<EOF" >> $GITHUB_ENV
732- echo "$content" >> $GITHUB_ENV
733- echo "EOF" >> $GITHUB_ENV
734-
735- - name : Find Comment
736- if : ${{ github.event.pull_request.number }}
737- uses : peter-evans/find-comment@v1
738- id : fc
739- with :
740- issue-number : ${{ github.event.pull_request.number }}
741- comment-author : ' github-actions[bot]'
742- body-includes : Test this pull request on ${{ matrix.os }}
743-
744- - name : Create or update comment
745- if : ${{ github.event.pull_request.number }}
746- uses : peter-evans/create-or-update-comment@v1
747- with :
748- comment-id : ${{ steps.fc.outputs.comment-id }}
749- issue-number : ${{ github.event.pull_request.number }}
750- body : |
751- # Test this pull request on ${{ matrix.os }}
752- #### Download the correct version for your architecture:
753- ${{ env.list }}
754-
755- ${{ env.macos-instructions }}
756- edit-mode : replace
0 commit comments