Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/MarketplaceRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
CPAPI_USERNAME: ${{ secrets.CPAPI_USERNAME }}
CPAPI_PASS_PROD: ${{ secrets.CPAPI_PASS_PROD }}
TAG: ${{ steps.variables.outputs.tag }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Send slack msg on failure"
if: ${{ failure() }}
uses: ./.github/actions/slack-notification
Expand Down
2 changes: 1 addition & 1 deletion packages/jsActions/mobile-resources-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@
"rimraf": "^4.4.1",
"rollup": "^2.79.2"
}
}
}
1 change: 1 addition & 0 deletions packages/jsActions/nanoflow-actions-native/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [5.2.1] Nanoflow Commons - 2026-3-4
- We fixed an issue with @react-native-community/geolocation where Android devices had difficulty obtaining precise location data.

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions packages/jsActions/nanoflow-actions-native/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nanoflow-actions-native",
"moduleName": "Nanoflow Commons",
"version": "5.2.0",
"version": "5.2.1",
"license": "Apache-2.0",
"copyright": "© Mendix Technology BV 2022. All rights reserved.",
"repository": {
Expand Down Expand Up @@ -37,4 +37,4 @@
"mendix": "~10.0.9976",
"rollup": "^2.79.2"
}
}
}
48 changes: 33 additions & 15 deletions scripts/release/marketplaceRelease.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,40 @@ async function uploadModuleToAppStore(pkgName, marketplaceId, version, minimumMX

async function getGithubAssetUrl() {
console.log("Retrieving informations from Github Tag");
const request = await fetch("GET", "https://api.github.com/repos/mendix/native-widgets/releases?per_page=10");
const data = (await request) ?? [];
const releaseId = data.find(info => info.tag_name === process.env.TAG)?.id;
if (!releaseId) {
throw new Error(`Could not find release with tag ${process.env.TAG} on GitHub`);
}
const assetsRequest = await fetch(
"GET",
`https://api.github.com/repos/mendix/native-widgets/releases/${releaseId}/assets`
);
const assetsData = (await assetsRequest) ?? [];
const downloadUrl = assetsData.find(asset => asset.name.endsWith(".mpk"))?.browser_download_url;
if (!downloadUrl) {
throw new Error(`Could not retrieve MPK url from GitHub release with tag ${process.env.TAG}`);
const tag = process.env.TAG;
const githubHeaders = process.env.GITHUB_TOKEN ? { Authorization: `Bearer ${process.env.GITHUB_TOKEN}` } : {};

// Use direct tag lookup endpoint instead of listing releases
// This avoids pagination issues and is more reliable
const maxRetries = 5;
const retryDelayMs = 5000;

for (let attempt = 1; attempt <= maxRetries; attempt++) {
console.log(`Attempt ${attempt}/${maxRetries}: Fetching release for tag ${tag}`);

const releaseData = await fetch(
"GET",
`https://api.github.com/repos/mendix/native-widgets/releases/tags/${tag}`,
undefined,
githubHeaders
);

if (releaseData && releaseData.id) {
console.log(`Found release: ${releaseData.name} (id: ${releaseData.id})`);
const downloadUrl = releaseData.assets?.find(asset => asset.name.endsWith(".mpk"))?.browser_download_url;
if (!downloadUrl) {
throw new Error(`Could not retrieve MPK url from GitHub release with tag ${tag}`);
}
return downloadUrl;
}

if (attempt < maxRetries) {
console.log(`Release not found yet, waiting ${retryDelayMs / 1000}s before retry...`);
await new Promise(resolve => setTimeout(resolve, retryDelayMs));
}
}
return downloadUrl;

throw new Error(`Could not find release with tag ${tag} on GitHub after ${maxRetries} attempts`);
}

async function createDraft(marketplaceId, version, minimumMXVersion) {
Expand Down