Skip to content

Commit 07e28cf

Browse files
committed
tmp
1 parent f28fc5d commit 07e28cf

3 files changed

Lines changed: 34 additions & 135 deletions

File tree

.github/workflows/ci.yml

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,7 @@ jobs:
569569

570570
pr-preview:
571571
name: Creator Hub Build
572+
needs: [build]
572573
strategy:
573574
fail-fast: true
574575
matrix:
@@ -588,6 +589,12 @@ jobs:
588589
node-version: 22
589590
cache: 'npm'
590591

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+
591598
- name: 'Install dependencies'
592599
run: npm ci
593600
working-directory: ${{ env.WORKING_DIRECTORY }}
@@ -607,19 +614,30 @@ jobs:
607614
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
608615
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
609616

610-
- name: Generate release version
611-
id: version
612-
uses: paulhatch/semantic-version@v5.4.0
613-
with:
614-
tag_prefix: ""
615-
version_format: ${major}.${minor}.${patch}
616-
major_pattern: "/^(major|breaking).+/"
617-
minor_pattern: "/^(minor|feat).+/"
618-
bump_each_commit: false
619-
bump_each_commit_patch_pattern: "/^(patch|fix).+/"
620-
search_commit_body: true
621-
user_format_type: "json"
622-
change_path: ${{ env.WORKING_DIRECTORY }}
617+
- name: Get latest Creator Hub release version (or fallback to last version before migration to monorepo)
618+
id: latest_version
619+
shell: bash
620+
run: |
621+
TAG=$(gh release list --limit 100 | grep '^creator-hub-v' | head -n 1 | awk '{print $1}')
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
629+
env:
630+
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
623641
624642
# Download 'SSLcom/esigner-codesign' to a folder called 'esigner-codesign' inside creator-hub package
625643
- name: Checkout esigner-codesign repository (Windows)
@@ -638,7 +656,7 @@ jobs:
638656
retry_wait_seconds: 15
639657
retry_on: error
640658
shell: 'bash'
641-
command: cd ${{ env.WORKING_DIRECTORY }} && npx electron-builder --config electron-builder.cjs --config.extraMetadata.version=${{ steps.version.outputs.version }} ${{ matrix.os == 'macos-latest' && format('--config.mac.notarize={0}', true) || '' }} --publish ${{ github.event.pull_request.number && 'never' || 'always' }}
659+
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' }}
642660
env:
643661
# Disable hard links to avoid issues with npm
644662
USE_HARD_LINKS: false

.github/workflows/creator-hub.yml

Lines changed: 0 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -112,124 +112,3 @@ jobs:
112112
env:
113113
NODE_OPTIONS: "--max-old-space-size=8192"
114114
ENABLE_E2E_TESTS: true
115-
116-
# ============================================================================
117-
# Release Jobs (Only run on main branch)
118-
# ============================================================================
119-
120-
drop-pre-release:
121-
name: Drop Pre-releases
122-
runs-on: ubuntu-latest
123-
needs: [ typechecking, tests ]
124-
if: github.ref == 'refs/heads/main'
125-
permissions:
126-
contents: write
127-
steps:
128-
- uses: actions/checkout@v4
129-
- uses: actions/setup-node@v4
130-
with:
131-
cache: 'npm'
132-
133-
- name: Drop pre releases
134-
uses: sgpublic/delete-release-action@v1.2
135-
with:
136-
pre-release-drop: true
137-
pre-release-keep-count: -1
138-
pre-release-drop-tag: true
139-
env:
140-
GITHUB_TOKEN: ${{ secrets.github_token }}
141-
142-
build-and-release:
143-
name: Build and Release
144-
strategy:
145-
fail-fast: true
146-
matrix:
147-
os: [ macos-latest, windows-latest ]
148-
runs-on: ${{ matrix.os }}
149-
needs: [ drop-pre-release ]
150-
if: github.ref == 'refs/heads/main'
151-
permissions:
152-
contents: write
153-
issues: write
154-
pull-requests: write
155-
steps:
156-
- uses: actions/checkout@v4
157-
with:
158-
fetch-depth: 0
159-
fetch-tags: true
160-
161-
- uses: actions/setup-node@v4
162-
with:
163-
node-version: 22
164-
cache: 'npm'
165-
cache-dependency-path: ${{ env.WORKING_DIRECTORY }}/package-lock.json
166-
167-
- name: Install dependencies
168-
run: npm ci
169-
working-directory: ${{ env.WORKING_DIRECTORY }}
170-
env:
171-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
172-
173-
- name: Build application
174-
run: echo MODE=production && npm run build
175-
working-directory: ${{ env.WORKING_DIRECTORY }}
176-
env:
177-
NODE_OPTIONS: "--max-old-space-size=8192"
178-
MODE: production
179-
VITE_SEGMENT_CREATORS_HUB_API_KEY: ${{ secrets.VITE_SEGMENT_CREATORS_HUB_API_KEY }}
180-
VITE_SEGMENT_INSPECTOR_API_KEY: ${{ secrets.VITE_SEGMENT_INSPECTOR_API_KEY }}
181-
VITE_ALLOWED_EXTERNAL_ORIGINS: ${{ secrets.VITE_ALLOWED_EXTERNAL_ORIGINS }}
182-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
183-
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
184-
185-
- name: Generate release version
186-
id: version
187-
uses: paulhatch/semantic-version@v5.4.0
188-
with:
189-
tag_prefix: ""
190-
version_format: ${major}.${minor}.${patch}
191-
major_pattern: "/^(major|breaking).+/"
192-
minor_pattern: "/^(minor|feat).+/"
193-
bump_each_commit: false
194-
bump_each_commit_patch_pattern: "/^(patch|fix).+/"
195-
search_commit_body: true
196-
user_format_type: "json"
197-
198-
- name: Checkout esigner-codesign repository (Windows)
199-
if: matrix.os == 'windows-latest'
200-
uses: actions/checkout@v3
201-
with:
202-
repository: 'SSLcom/esigner-codesign'
203-
path: esigner-codesign
204-
205-
- name: Build and publish artifacts
206-
uses: nick-fields/retry@v3
207-
with:
208-
timeout_minutes: 60
209-
max_attempts: 6
210-
retry_wait_seconds: 15
211-
retry_on: error
212-
shell: 'bash'
213-
command: npx electron-builder --config electron-builder.cjs --config.extraMetadata.version=${{ steps.version.outputs.version }} ${{ matrix.os == 'macos-latest' && '--config.mac.notarize=true' || '' }} --publish always
214-
working-directory: ${{ env.WORKING_DIRECTORY }}
215-
env:
216-
USE_HARD_LINKS: false
217-
CSC_LINK: ${{ secrets.MACOS_CSC_LINK }}
218-
CSC_KEY_PASSWORD: ${{ secrets.MACOS_CSC_KEY_PASSWORD }}
219-
APPLE_ID: ${{ secrets.MACOS_NOTARIZATION_APPLE_ID }}
220-
APPLE_TEAM_ID: ${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}
221-
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.MACOS_NOTARIZATION_PWD }}
222-
GH_TOKEN: ${{ secrets.github_token }}
223-
EP_PRE_RELEASE: true
224-
CODE_SIGN_SCRIPT_PATH: ${{ matrix.os == 'windows-latest' && format('{0}\\esigner-codesign\\dist\\index.js', github.workspace) || '' }}
225-
INPUT_COMMAND: "sign"
226-
INPUT_FILE_PATH: "${{ github.workspace }}\\${{ env.WORKING_DIRECTORY }}\\dist\\Decentraland Creator Hub-${{ steps.version.outputs.version }}-win-x64.exe"
227-
INPUT_OVERRIDE: "true"
228-
INPUT_MALWARE_BLOCK: "false"
229-
INPUT_CLEAN_LOGS: "false"
230-
INPUT_JVM_MAX_MEMORY: "1024M"
231-
INPUT_ENVIRONMENT_NAME: "PROD"
232-
INPUT_USERNAME: ${{ secrets.ES_USERNAME }}
233-
INPUT_PASSWORD: ${{ secrets.ES_PASSWORD }}
234-
INPUT_TOTP_SECRET: ${{ secrets.ES_TOTP_SECRET }}
235-
INPUT_CREDENTIAL_ID: ${{ secrets.WINDOWS_CREDENTIAL_ID_SIGNER }}

packages/@dcl/creator-hub/electron-builder.cjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ const config = {
9494
{
9595
provider: 'github',
9696
vPrefixedTagName: false,
97+
tag: 'creator-hub-v${version}',
98+
releaseName: 'Creator Hub v${version}',
9799
},
98100
],
99101
};

0 commit comments

Comments
 (0)