From f005e9c886b6fa51d7458c0015167f0d0b29b326 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Tue, 15 Sep 2026 17:03:27 +0530 Subject: [PATCH 1/2] fix: marketplace verification logic updated --- .github/workflows/MarketplaceRelease.yml | 11 ++++++++++- scripts/release/marketplaceRelease.js | 25 +++++++++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/MarketplaceRelease.yml b/.github/workflows/MarketplaceRelease.yml index ed3360bb1..a55f8854e 100644 --- a/.github/workflows/MarketplaceRelease.yml +++ b/.github/workflows/MarketplaceRelease.yml @@ -47,6 +47,7 @@ jobs: GH_PAT: ${{ secrets.GH_PAT }} TAG: ${{ steps.variables.outputs.tag }} - name: "Check changes and publish package ${{ steps.variables.outputs.tag }}" + id: publish run: pnpm --filter=${{ steps.scope.outputs._0 }} run release:marketplace env: OPENID_URL: ${{ secrets.OPENID_URL }} @@ -54,7 +55,15 @@ jobs: CPAPI_PASS_PROD: ${{ secrets.CPAPI_PASS_PROD }} TAG: ${{ steps.variables.outputs.tag }} MENDIX_PAT_TOKEN: ${{ secrets.MENDIX_PAT_TOKEN }} - - name: "Send slack msg on failure" + - name: "Send slack notification on verification failure" + if: ${{ steps.publish.outputs.verification_failed == 'true' }} + uses: ./.github/actions/slack-notification + with: + channel-id: ${{ secrets.SLACK_CHANNEL_ID }} + message: | + :warning: *${{ steps.scope.outputs._0 }}* v${{ steps.scope.outputs._1 }} — published successfully but verification step failed. Please check manually: <${{ steps.publish.outputs.marketplace_url }}|Marketplace> · + bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + - name: "Send slack msg on publish failure" if: ${{ failure() }} uses: ./.github/actions/slack-notification with: diff --git a/scripts/release/marketplaceRelease.js b/scripts/release/marketplaceRelease.js index 624198ac4..1e891b09e 100644 --- a/scripts/release/marketplaceRelease.js +++ b/scripts/release/marketplaceRelease.js @@ -1,4 +1,5 @@ const { join } = require("path"); +const { appendFileSync } = require("fs"); const config = { appStoreUrl: "https://appstore.home.mendix.com/rest/packagesapi/v2", @@ -44,7 +45,13 @@ async function uploadModuleToAppStore(pkgName, marketplaceId, version, minimumMX await publishDraft(postResponse.UUID); console.log(`Successfully uploaded ${pkgName} to the Mendix Marketplace.`); - await verifyReleasePublished(marketplaceId, version, pkgName); + try { + await verifyReleasePublished(marketplaceId, version, pkgName); + } catch (verificationError) { + console.warn(`⚠️ WARNING: ${verificationError.message}`); + console.warn(`Please manually verify at: https://marketplace.mendix.com/link/component/${marketplaceId}`); + setVerificationFailedOutput(marketplaceId); + } } catch (error) { error.message = `Failed uploading ${pkgName} to appstore with error: ${error.message}`; throw error; @@ -174,6 +181,22 @@ async function fetchData(method, url, body, additionalHeaders) { } } +function setVerificationFailedOutput(marketplaceId) { + try { + const githubOutput = process.env.GITHUB_OUTPUT; + if (githubOutput) { + appendFileSync( + githubOutput, + `verification_failed=true\nmarketplace_url=https://marketplace.mendix.com/link/component/${marketplaceId}\n` + ); + } + } catch (error) { + console.warn( + `Failed to set GitHub Actions output: ${error.message}. Please manually verify the release at https://marketplace.mendix.com/link/component/${marketplaceId}` + ); + } +} + function packageMetadata() { const pkgPath = join(process.cwd(), "package.json"); const { name, widgetName, version, marketplace } = require(pkgPath); From 3078a1ad0d22523a79512ddd3b0ccda71606c2f5 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Wed, 16 Sep 2026 12:51:22 +0530 Subject: [PATCH 2/2] fix: update get contents API with publisheSince param --- scripts/release/marketplaceRelease.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/release/marketplaceRelease.js b/scripts/release/marketplaceRelease.js index 1e891b09e..1d0893859 100644 --- a/scripts/release/marketplaceRelease.js +++ b/scripts/release/marketplaceRelease.js @@ -224,9 +224,11 @@ async function verifyReleasePublished(contentId, expectedVersion, pkgName) { console.log(`Verification attempt ${attempt}/${maxRetries}: Checking for version ${expectedVersion}`); try { - // Call the Mendix Content API to get all released module versions + // Call the Mendix Content API to get all released module versions since the last 24 hours + const yesterday = new Date(Date.now() - 24 * 60 * 60 * 1000); + const publishedSince = yesterday.toISOString().split("T")[0]; const versionsResponse = await fetch( - `https://marketplace-api.mendix.com/v1/content/${contentId}/versions`, + `https://marketplace-api.mendix.com/v1/content/${contentId}/versions?publishedSince=${publishedSince}`, { method: "GET", headers: {