From 9983a6cbb5ddeaa1934c6604e07c2487e3f79070 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Mon, 20 Jul 2026 10:49:56 +0530 Subject: [PATCH 01/16] remove sync file removal changes from release docs script --- .github/scripts/release-native-template.mjs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/scripts/release-native-template.mjs b/.github/scripts/release-native-template.mjs index 86be5aa8..b24a39c1 100644 --- a/.github/scripts/release-native-template.mjs +++ b/.github/scripts/release-native-template.mjs @@ -99,10 +99,6 @@ function injectUnreleasedToDoc(docPath, unreleasedContent) { return `${frontmatter}\n\n${beforeReleases}${releaseHeading}\n\n${unreleasedContent}\n\n${releaseSections}`; } -// This file exists only in the fork (MendixMobile/docs) and not in upstream (mendix/docs). -// Removing it in our branch ensures it doesn't appear in the cross-fork PR diff. -const FORK_SYNC_FILE = ".github/workflows/sync.yml"; - async function cloneDocsRepo() { const git = simpleGit(); const docsCloneDir = fs.mkdtempSync( @@ -131,10 +127,6 @@ async function updateDocsNTReleaseNotes(unreleasedContent) { } async function createPRUpdateDocsNTReleaseNotes(git) { - // Remove the fork's sync.yml so it doesn't appear in the cross-fork PR diff. - if (fs.existsSync(FORK_SYNC_FILE)) { - await git.rm(FORK_SYNC_FILE); - } await git.add(TARGET_FILE); await git.commit( `docs: update mobile release notes for v${NATIVE_TEMPLATE_VERSION}`, From 7e4df9db9f2920ca8573f514a162ff5fb72260af Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Mon, 20 Jul 2026 12:04:34 +0530 Subject: [PATCH 02/16] add sync step and create directory if missing --- .github/scripts/release-native-template.mjs | 5 ++--- .github/workflows/publish-changelog-to-docs.yml | 5 +++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/scripts/release-native-template.mjs b/.github/scripts/release-native-template.mjs index b24a39c1..2aff2be4 100644 --- a/.github/scripts/release-native-template.mjs +++ b/.github/scripts/release-native-template.mjs @@ -62,9 +62,8 @@ function buildFrontmatter() { // Docs function injectUnreleasedToDoc(docPath, unreleasedContent) { if (!fs.existsSync(DOCS_PARENT_DIR)) { - throw new Error( - `Parent directory not found: ${DOCS_PARENT_DIR}\nA new Studio Pro parent folder requires manual setup in the docs repo.`, - ); + console.log(`Parent directory not found. Creating: ${DOCS_PARENT_DIR}`); + fs.mkdirSync(DOCS_PARENT_DIR, { recursive: true }); } const date = new Date(); diff --git a/.github/workflows/publish-changelog-to-docs.yml b/.github/workflows/publish-changelog-to-docs.yml index e1c0e693..f13a90b6 100644 --- a/.github/workflows/publish-changelog-to-docs.yml +++ b/.github/workflows/publish-changelog-to-docs.yml @@ -21,6 +21,11 @@ jobs: publish: runs-on: ubuntu-latest steps: + - name: Sync docs fork with upstream + run: gh repo sync MendixMobile/docs --branch development --force + env: + GH_TOKEN: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} + - uses: actions/checkout@v2 with: ref: ${{ github.event.inputs.branch }} From 01f74f4729ec619e592d2c874557c3ae32b1ccd4 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Mon, 20 Jul 2026 12:17:02 +0530 Subject: [PATCH 03/16] testing commit for folder creation --- .github/scripts/release-native-template.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/release-native-template.mjs b/.github/scripts/release-native-template.mjs index 2aff2be4..bb1d6d01 100644 --- a/.github/scripts/release-native-template.mjs +++ b/.github/scripts/release-native-template.mjs @@ -36,7 +36,7 @@ const DOCS_REPO_OWNER = "MendixMobile"; const DOCS_UPSTREAM_OWNER = "mendix"; const DOCS_BRANCH_NAME = `update-native-template-release-notes-v${NATIVE_TEMPLATE_VERSION}`; -const DOCS_PARENT_DIR = `content/en/docs/releasenotes/mobile/native-template/nt-studio-pro-${STUDIO_PRO_MAJOR}-parent`; +const DOCS_PARENT_DIR = `content/en/docs/releasenotes/mobile/native-template/nt-studio-pro-12-parent`; const TARGET_FILE = `${DOCS_PARENT_DIR}/nt-${NATIVE_TEMPLATE_MAJOR}-rn.md`; const octokit = new Octokit({ auth: MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }); From 9cc4e88628ed96df2454ffc8acc127ff9fd0bfc7 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Mon, 20 Jul 2026 12:25:16 +0530 Subject: [PATCH 04/16] revert folder creation testing commit --- .github/scripts/release-native-template.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/release-native-template.mjs b/.github/scripts/release-native-template.mjs index bb1d6d01..2aff2be4 100644 --- a/.github/scripts/release-native-template.mjs +++ b/.github/scripts/release-native-template.mjs @@ -36,7 +36,7 @@ const DOCS_REPO_OWNER = "MendixMobile"; const DOCS_UPSTREAM_OWNER = "mendix"; const DOCS_BRANCH_NAME = `update-native-template-release-notes-v${NATIVE_TEMPLATE_VERSION}`; -const DOCS_PARENT_DIR = `content/en/docs/releasenotes/mobile/native-template/nt-studio-pro-12-parent`; +const DOCS_PARENT_DIR = `content/en/docs/releasenotes/mobile/native-template/nt-studio-pro-${STUDIO_PRO_MAJOR}-parent`; const TARGET_FILE = `${DOCS_PARENT_DIR}/nt-${NATIVE_TEMPLATE_MAJOR}-rn.md`; const octokit = new Octokit({ auth: MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }); From a9cbbda5da8e1970161085348f2125141ec090e1 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Mon, 20 Jul 2026 17:00:22 +0530 Subject: [PATCH 05/16] merge publishing flow with release flow --- .github/workflows/release-it.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-it.yml b/.github/workflows/release-it.yml index 49bf65b5..d98b7ddd 100644 --- a/.github/workflows/release-it.yml +++ b/.github/workflows/release-it.yml @@ -15,6 +15,14 @@ on: - preminor - premajor - prepatch + studio_pro_version: + description: 'Studio Pro major version (determines the docs parent folder for changelog publishing)' + required: true + default: 'Studio Pro 11.x' + type: choice + options: + - 'Studio Pro 10.x' + - 'Studio Pro 11.x' jobs: release: @@ -37,4 +45,19 @@ jobs: git config --global user.name "github-action" release-it -VV --increment=${{ github.event.inputs.version }} --ci --github.release --github.draft --git.commitMessage="chore: release v\${version}" --git.tagName="v\${version}" - + - name: Sync docs fork with upstream + if: ${{ contains(fromJSON('["patch","minor","major"]'), github.event.inputs.version) }} + run: gh repo sync MendixMobile/docs --branch development --force + env: + GH_TOKEN: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} + + - name: Install docs release script dependencies + if: ${{ contains(fromJSON('["patch","minor","major"]'), github.event.inputs.version) }} + run: npm ci --prefix .github/scripts + + - name: Create release notes PR in mendix/docs Github repository + if: ${{ contains(fromJSON('["patch","minor","major"]'), github.event.inputs.version) }} + env: + MENDIX_MOBILE_DOCS_PR_GITHUB_PAT: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} + STUDIO_PRO_MAJOR: ${{ github.event.inputs.studio_pro_version == 'Studio Pro 10.x' && '10' || '11' }} + run: node .github/scripts/release-native-template.mjs From 7b7bcc53e5dd15af56e21143c7dfee8f5db9dda0 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Mon, 20 Jul 2026 17:04:13 +0530 Subject: [PATCH 06/16] delete publish changelog yaml file and update release list --- .../workflows/publish-changelog-to-docs.yml | 44 ------------------- .github/workflows/update_releases_list.yml | 2 - 2 files changed, 46 deletions(-) delete mode 100644 .github/workflows/publish-changelog-to-docs.yml diff --git a/.github/workflows/publish-changelog-to-docs.yml b/.github/workflows/publish-changelog-to-docs.yml deleted file mode 100644 index f13a90b6..00000000 --- a/.github/workflows/publish-changelog-to-docs.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Publish Changelog to Mendix Docs - -on: - workflow_dispatch: - inputs: - branch: - description: 'Branch to read the changelog and version from' - required: true - default: 'master' - type: string - studio_pro_version: - description: 'Studio Pro major version (determines the docs parent folder)' - required: true - default: 'Studio Pro 11.x' - type: choice - options: - - 'Studio Pro 10.x' - - 'Studio Pro 11.x' - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - name: Sync docs fork with upstream - run: gh repo sync MendixMobile/docs --branch development --force - env: - GH_TOKEN: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} - - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.inputs.branch }} - - - uses: actions/setup-node@v3 - with: - node-version-file: .nvmrc - - - name: Install docs release script dependencies - run: npm ci --prefix .github/scripts - - - name: Create release notes PR in mendix/docs Github repository - env: - MENDIX_MOBILE_DOCS_PR_GITHUB_PAT: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} - STUDIO_PRO_MAJOR: ${{ github.event.inputs.studio_pro_version == 'Studio Pro 10.x' && '10' || '11' }} - run: node .github/scripts/release-native-template.mjs diff --git a/.github/workflows/update_releases_list.yml b/.github/workflows/update_releases_list.yml index 79bce7ec..c5cf562e 100644 --- a/.github/workflows/update_releases_list.yml +++ b/.github/workflows/update_releases_list.yml @@ -57,5 +57,3 @@ jobs: A new version of Native Template has been released with updated version compatibility information. Please review the PR for more details: ${{ github.server_url }}/${{ github.repository }}/pull/${{ steps.pr.outputs.number }} - - 📝 *Reminder:* Run the <${{ github.server_url }}/${{ github.repository }}/actions/workflows/publish-changelog-to-docs.yml|Publish Changelog to Mendix Docs> workflow to publish the release notes to the docs repo. From 0fe6ea632f157720bfdd8b7120be6f7cd2442e3b Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Mon, 20 Jul 2026 17:19:06 +0530 Subject: [PATCH 07/16] Add sync logic to run every day --- .github/workflows/sync-docs-fork-daily.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/sync-docs-fork-daily.yml diff --git a/.github/workflows/sync-docs-fork-daily.yml b/.github/workflows/sync-docs-fork-daily.yml new file mode 100644 index 00000000..2da07aa9 --- /dev/null +++ b/.github/workflows/sync-docs-fork-daily.yml @@ -0,0 +1,15 @@ +name: Sync Docs Fork Daily + +on: + schedule: + - cron: '0 0 * * *' # Daily at midnight UTC + workflow_dispatch: # Allow manual trigger + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Sync MendixMobile/docs fork with upstream + run: gh repo sync MendixMobile/docs --branch development --force + env: + GH_TOKEN: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} From b220839edd19216eef6efa75fb8af48de80dfdac Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Mon, 20 Jul 2026 17:44:26 +0530 Subject: [PATCH 08/16] Revert "delete publish changelog yaml file and update release list" This reverts commit f8f8f72724120dc48531ec9ad140f6805653617c. --- .../workflows/publish-changelog-to-docs.yml | 44 +++++++++++++++++++ .github/workflows/update_releases_list.yml | 2 + 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/publish-changelog-to-docs.yml diff --git a/.github/workflows/publish-changelog-to-docs.yml b/.github/workflows/publish-changelog-to-docs.yml new file mode 100644 index 00000000..f13a90b6 --- /dev/null +++ b/.github/workflows/publish-changelog-to-docs.yml @@ -0,0 +1,44 @@ +name: Publish Changelog to Mendix Docs + +on: + workflow_dispatch: + inputs: + branch: + description: 'Branch to read the changelog and version from' + required: true + default: 'master' + type: string + studio_pro_version: + description: 'Studio Pro major version (determines the docs parent folder)' + required: true + default: 'Studio Pro 11.x' + type: choice + options: + - 'Studio Pro 10.x' + - 'Studio Pro 11.x' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Sync docs fork with upstream + run: gh repo sync MendixMobile/docs --branch development --force + env: + GH_TOKEN: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} + + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.inputs.branch }} + + - uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc + + - name: Install docs release script dependencies + run: npm ci --prefix .github/scripts + + - name: Create release notes PR in mendix/docs Github repository + env: + MENDIX_MOBILE_DOCS_PR_GITHUB_PAT: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} + STUDIO_PRO_MAJOR: ${{ github.event.inputs.studio_pro_version == 'Studio Pro 10.x' && '10' || '11' }} + run: node .github/scripts/release-native-template.mjs diff --git a/.github/workflows/update_releases_list.yml b/.github/workflows/update_releases_list.yml index c5cf562e..79bce7ec 100644 --- a/.github/workflows/update_releases_list.yml +++ b/.github/workflows/update_releases_list.yml @@ -57,3 +57,5 @@ jobs: A new version of Native Template has been released with updated version compatibility information. Please review the PR for more details: ${{ github.server_url }}/${{ github.repository }}/pull/${{ steps.pr.outputs.number }} + + 📝 *Reminder:* Run the <${{ github.server_url }}/${{ github.repository }}/actions/workflows/publish-changelog-to-docs.yml|Publish Changelog to Mendix Docs> workflow to publish the release notes to the docs repo. From 9d4dce518fac8c1d17042fd955fec35dfec7d0b6 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Mon, 20 Jul 2026 17:46:17 +0530 Subject: [PATCH 09/16] Add logic to raise PR in NT to update changelog --- .github/scripts/release-native-template.mjs | 84 ++++++++++++++++++++- 1 file changed, 81 insertions(+), 3 deletions(-) diff --git a/.github/scripts/release-native-template.mjs b/.github/scripts/release-native-template.mjs index 2aff2be4..4a0bf6ec 100644 --- a/.github/scripts/release-native-template.mjs +++ b/.github/scripts/release-native-template.mjs @@ -30,6 +30,13 @@ const STUDIO_PRO_MAJOR = process.env.STUDIO_PRO_MAJOR; const GIT_AUTHOR_NAME = "MendixMobile"; const GIT_AUTHOR_EMAIL = "moo@mendix.com"; +// Native Template Repo Settings +const NT_REPO_OWNER = process.env.GITHUB_REPOSITORY_OWNER || "mendix"; +const NT_REPO_NAME = process.env.GITHUB_REPOSITORY + ? process.env.GITHUB_REPOSITORY.split("/")[1] + : "native-template"; +const NT_CHANGELOG_BRANCH_NAME = `update-changelog-v${NATIVE_TEMPLATE_VERSION}`; + // Docs Repo Settings const DOCS_REPO_NAME = "docs"; const DOCS_REPO_OWNER = "MendixMobile"; @@ -41,6 +48,14 @@ const TARGET_FILE = `${DOCS_PARENT_DIR}/nt-${NATIVE_TEMPLATE_MAJOR}-rn.md`; const octokit = new Octokit({ auth: MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }); +function getToday() { + const today = new Date(); + const yyyy = today.getFullYear(); + const mm = String(today.getMonth() + 1).padStart(2, "0"); + const dd = String(today.getDate()).padStart(2, "0"); + return `${yyyy}-${mm}-${dd}`; +} + function extractUnreleasedChangelog() { const changelogPath = path.resolve( path.join(__dirname, "..", "..", "CHANGELOG.md"), @@ -52,13 +67,71 @@ function extractUnreleasedChangelog() { if (!match) throw new Error("No [Unreleased] section found!"); const unreleasedContent = match[1].trim(); if (!unreleasedContent) throw new Error("No changes under [Unreleased]!"); - return unreleasedContent; + return { changelog, unreleasedContent, changelogPath }; } function buildFrontmatter() { return `---\ntitle: "Native Template ${NATIVE_TEMPLATE_MAJOR}"\nurl: /releasenotes/mobile/nt-${NATIVE_TEMPLATE_MAJOR}-rn/\nweight: 1\ndescription: "Native Template ${NATIVE_TEMPLATE_MAJOR}"\n---`; } +// Changelog Update for Native Template Repo +function updateChangelog({ changelog, unreleasedContent, changelogPath }) { + const today = getToday(); + const newSection = `## [${NATIVE_TEMPLATE_VERSION}] - ${today}\n\n${unreleasedContent}\n\n`; + const unreleasedRegex = + /^## \[Unreleased\](.*?)(?=^## \[\d+\.\d+\.\d+\][^\n]*|\Z)/ms; + const updatedChangelog = changelog.replace( + unreleasedRegex, + `## [Unreleased]\n\n${newSection}` + ); + fs.writeFileSync(changelogPath, updatedChangelog, "utf-8"); +} + +async function createPRUpdateChangelog() { + const git = simpleGit(); + + await git.addConfig("user.name", GIT_AUTHOR_NAME, ["--global"]); + await git.addConfig("user.email", GIT_AUTHOR_EMAIL, ["--global"]); + + await git.checkoutLocalBranch(NT_CHANGELOG_BRANCH_NAME); + + await git.add("CHANGELOG.md"); + await git.commit(`chore: update CHANGELOG for v${NATIVE_TEMPLATE_VERSION}`); + await git.push("origin", NT_CHANGELOG_BRANCH_NAME, ["--force-with-lease"]); + + const prBody = ` +Automated update of CHANGELOG.md for v${NATIVE_TEMPLATE_VERSION}. + +This PR moves the \`[Unreleased]\` section content to a new versioned section \`[${NATIVE_TEMPLATE_VERSION}]\`. + +--- + +**Note:** +This pull request was automatically generated by an automation process managed by the Mobile team. +**Please do not take any action on this pull request unless it has been reviewed and approved by a member of the Mobile team.** +`; + + await octokit.pulls.create({ + owner: NT_REPO_OWNER, + repo: NT_REPO_NAME, + title: `Update CHANGELOG for v${NATIVE_TEMPLATE_VERSION}`, + head: NT_CHANGELOG_BRANCH_NAME, + base: "master", + body: prBody, + draft: true, + }); +} + +async function updateNTChangelog(changelog, unreleasedContent, changelogPath) { + try { + updateChangelog({ changelog, unreleasedContent, changelogPath }); + await createPRUpdateChangelog(); + } catch (err) { + console.error("❌ Updating NT Changelog failed:", err); + process.exit(1); + } +} + // Docs function injectUnreleasedToDoc(docPath, unreleasedContent) { if (!fs.existsSync(DOCS_PARENT_DIR)) { @@ -162,7 +235,7 @@ async function updateNTReleaseNotes(unreleasedContent) { updateDocsNTReleaseNotes(unreleasedContent); await createPRUpdateDocsNTReleaseNotes(git); } catch (err) { - console.error("❌ Updating NT Release Notes failed:", err); + console.error("❌ Updating NT Release Notes in Docs failed:", err); process.exit(1); } } @@ -176,7 +249,12 @@ function readVersionFromPackageJson() { } (async () => { - const unreleasedContent = extractUnreleasedChangelog(); + const { changelog, unreleasedContent, changelogPath } = + extractUnreleasedChangelog(); + + // Update CHANGELOG.md in native-template repo + await updateNTChangelog(changelog, unreleasedContent, changelogPath); + // Update release notes in docs repo await updateNTReleaseNotes(unreleasedContent); })(); From 6f295026329120126399d718f417998415304be4 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Mon, 20 Jul 2026 18:10:31 +0530 Subject: [PATCH 10/16] Fix base branch for changelog in NT --- .github/scripts/release-native-template.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/scripts/release-native-template.mjs b/.github/scripts/release-native-template.mjs index 4a0bf6ec..d68b2ff3 100644 --- a/.github/scripts/release-native-template.mjs +++ b/.github/scripts/release-native-template.mjs @@ -93,6 +93,9 @@ async function createPRUpdateChangelog() { await git.addConfig("user.name", GIT_AUTHOR_NAME, ["--global"]); await git.addConfig("user.email", GIT_AUTHOR_EMAIL, ["--global"]); + // Get the current branch name (the one selected in GitHub Actions UI) + const currentBranch = await git.revparse(["--abbrev-ref", "HEAD"]); + await git.checkoutLocalBranch(NT_CHANGELOG_BRANCH_NAME); await git.add("CHANGELOG.md"); @@ -116,7 +119,7 @@ This pull request was automatically generated by an automation process managed b repo: NT_REPO_NAME, title: `Update CHANGELOG for v${NATIVE_TEMPLATE_VERSION}`, head: NT_CHANGELOG_BRANCH_NAME, - base: "master", + base: currentBranch, body: prBody, draft: true, }); From 594be380dc45750ef6953ad7857296856ad8d680 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Mon, 20 Jul 2026 18:17:23 +0530 Subject: [PATCH 11/16] Use force to push to NT branch --- .github/scripts/release-native-template.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/release-native-template.mjs b/.github/scripts/release-native-template.mjs index d68b2ff3..9f0dd51e 100644 --- a/.github/scripts/release-native-template.mjs +++ b/.github/scripts/release-native-template.mjs @@ -100,7 +100,7 @@ async function createPRUpdateChangelog() { await git.add("CHANGELOG.md"); await git.commit(`chore: update CHANGELOG for v${NATIVE_TEMPLATE_VERSION}`); - await git.push("origin", NT_CHANGELOG_BRANCH_NAME, ["--force-with-lease"]); + await git.push("origin", NT_CHANGELOG_BRANCH_NAME, ["--force"]); const prBody = ` Automated update of CHANGELOG.md for v${NATIVE_TEMPLATE_VERSION}. From 1f0cc864b94766a8ed215995e10a16a35218f454 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Mon, 20 Jul 2026 18:25:24 +0530 Subject: [PATCH 12/16] Delete Publishing changelog job and update release list --- .../workflows/publish-changelog-to-docs.yml | 44 ------------------- .github/workflows/update_releases_list.yml | 4 +- 2 files changed, 1 insertion(+), 47 deletions(-) delete mode 100644 .github/workflows/publish-changelog-to-docs.yml diff --git a/.github/workflows/publish-changelog-to-docs.yml b/.github/workflows/publish-changelog-to-docs.yml deleted file mode 100644 index f13a90b6..00000000 --- a/.github/workflows/publish-changelog-to-docs.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Publish Changelog to Mendix Docs - -on: - workflow_dispatch: - inputs: - branch: - description: 'Branch to read the changelog and version from' - required: true - default: 'master' - type: string - studio_pro_version: - description: 'Studio Pro major version (determines the docs parent folder)' - required: true - default: 'Studio Pro 11.x' - type: choice - options: - - 'Studio Pro 10.x' - - 'Studio Pro 11.x' - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - name: Sync docs fork with upstream - run: gh repo sync MendixMobile/docs --branch development --force - env: - GH_TOKEN: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} - - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.inputs.branch }} - - - uses: actions/setup-node@v3 - with: - node-version-file: .nvmrc - - - name: Install docs release script dependencies - run: npm ci --prefix .github/scripts - - - name: Create release notes PR in mendix/docs Github repository - env: - MENDIX_MOBILE_DOCS_PR_GITHUB_PAT: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} - STUDIO_PRO_MAJOR: ${{ github.event.inputs.studio_pro_version == 'Studio Pro 10.x' && '10' || '11' }} - run: node .github/scripts/release-native-template.mjs diff --git a/.github/workflows/update_releases_list.yml b/.github/workflows/update_releases_list.yml index 79bce7ec..f2076010 100644 --- a/.github/workflows/update_releases_list.yml +++ b/.github/workflows/update_releases_list.yml @@ -56,6 +56,4 @@ jobs: A new version of Native Template has been released with updated version compatibility information. - Please review the PR for more details: ${{ github.server_url }}/${{ github.repository }}/pull/${{ steps.pr.outputs.number }} - - 📝 *Reminder:* Run the <${{ github.server_url }}/${{ github.repository }}/actions/workflows/publish-changelog-to-docs.yml|Publish Changelog to Mendix Docs> workflow to publish the release notes to the docs repo. + Please review the PR for more details: ${{ github.server_url }}/${{ github.repository }}/pull/${{ steps.pr.outputs.number }} \ No newline at end of file From f2271f9adc1a6fc7691795a7233ead62c0a9ecd0 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Mon, 20 Jul 2026 18:35:35 +0530 Subject: [PATCH 13/16] Improvements in release script and pipeline file --- .github/scripts/release-native-template.mjs | 7 +++---- .github/workflows/release-it.yml | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/scripts/release-native-template.mjs b/.github/scripts/release-native-template.mjs index 9f0dd51e..e23166c4 100644 --- a/.github/scripts/release-native-template.mjs +++ b/.github/scripts/release-native-template.mjs @@ -31,10 +31,8 @@ const GIT_AUTHOR_NAME = "MendixMobile"; const GIT_AUTHOR_EMAIL = "moo@mendix.com"; // Native Template Repo Settings -const NT_REPO_OWNER = process.env.GITHUB_REPOSITORY_OWNER || "mendix"; -const NT_REPO_NAME = process.env.GITHUB_REPOSITORY - ? process.env.GITHUB_REPOSITORY.split("/")[1] - : "native-template"; +const NT_REPO_OWNER = process.env.GITHUB_REPOSITORY_OWNER; +const NT_REPO_NAME = process.env.GITHUB_REPOSITORY.split("/")[1]; const NT_CHANGELOG_BRANCH_NAME = `update-changelog-v${NATIVE_TEMPLATE_VERSION}`; // Docs Repo Settings @@ -87,6 +85,7 @@ function updateChangelog({ changelog, unreleasedContent, changelogPath }) { fs.writeFileSync(changelogPath, updatedChangelog, "utf-8"); } +// Raise a PR to update the CHANGELOG.md in the native-template repo async function createPRUpdateChangelog() { const git = simpleGit(); diff --git a/.github/workflows/release-it.yml b/.github/workflows/release-it.yml index d98b7ddd..6b0fd916 100644 --- a/.github/workflows/release-it.yml +++ b/.github/workflows/release-it.yml @@ -55,7 +55,7 @@ jobs: if: ${{ contains(fromJSON('["patch","minor","major"]'), github.event.inputs.version) }} run: npm ci --prefix .github/scripts - - name: Create release notes PR in mendix/docs Github repository + - name: Create Changelog PR in native-template and release notes PR in mendix/docs if: ${{ contains(fromJSON('["patch","minor","major"]'), github.event.inputs.version) }} env: MENDIX_MOBILE_DOCS_PR_GITHUB_PAT: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} From 94b134ab8fdb96d99eeae9a6061da97e00033af5 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Tue, 21 Jul 2026 12:13:31 +0530 Subject: [PATCH 14/16] remove the sync job as it will be on master --- .github/workflows/sync-docs-fork-daily.yml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .github/workflows/sync-docs-fork-daily.yml diff --git a/.github/workflows/sync-docs-fork-daily.yml b/.github/workflows/sync-docs-fork-daily.yml deleted file mode 100644 index 2da07aa9..00000000 --- a/.github/workflows/sync-docs-fork-daily.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Sync Docs Fork Daily - -on: - schedule: - - cron: '0 0 * * *' # Daily at midnight UTC - workflow_dispatch: # Allow manual trigger - -jobs: - sync: - runs-on: ubuntu-latest - steps: - - name: Sync MendixMobile/docs fork with upstream - run: gh repo sync MendixMobile/docs --branch development --force - env: - GH_TOKEN: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} From 9ea060dda864199af8b92129abd6ce0a9ff20731 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Wed, 22 Jul 2026 13:08:04 +0530 Subject: [PATCH 15/16] add publish job for testing new pAT --- .../workflows/publish-changelog-to-docs.yml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/publish-changelog-to-docs.yml diff --git a/.github/workflows/publish-changelog-to-docs.yml b/.github/workflows/publish-changelog-to-docs.yml new file mode 100644 index 00000000..089b9566 --- /dev/null +++ b/.github/workflows/publish-changelog-to-docs.yml @@ -0,0 +1,44 @@ +name: Publish Changelog to Mendix Docs + +on: + workflow_dispatch: + inputs: + branch: + description: 'Branch to read the changelog and version from' + required: true + default: 'master' + type: string + studio_pro_version: + description: 'Studio Pro major version (determines the docs parent folder)' + required: true + default: 'Studio Pro 11.x' + type: choice + options: + - 'Studio Pro 10.x' + - 'Studio Pro 11.x' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Sync docs fork with upstream + run: gh repo sync MendixMobile/docs --branch development --force + env: + GH_TOKEN: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} + + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.inputs.branch }} + + - uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc + + - name: Install docs release script dependencies + run: npm ci --prefix .github/scripts + + - name: Create release notes PR in mendix/docs Github repository + env: + MENDIX_MOBILE_DOCS_PR_GITHUB_PAT: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} + STUDIO_PRO_MAJOR: ${{ github.event.inputs.studio_pro_version == 'Studio Pro 10.x' && '10' || '11' }} + run: node .github/scripts/release-native-template.mjs \ No newline at end of file From 306b8c6e2b27a69c1399660cb0bd688663cfc49a Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Wed, 22 Jul 2026 13:23:24 +0530 Subject: [PATCH 16/16] remove publish changelog to docs yml file --- .../workflows/publish-changelog-to-docs.yml | 44 ------------------- 1 file changed, 44 deletions(-) delete mode 100644 .github/workflows/publish-changelog-to-docs.yml diff --git a/.github/workflows/publish-changelog-to-docs.yml b/.github/workflows/publish-changelog-to-docs.yml deleted file mode 100644 index 089b9566..00000000 --- a/.github/workflows/publish-changelog-to-docs.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Publish Changelog to Mendix Docs - -on: - workflow_dispatch: - inputs: - branch: - description: 'Branch to read the changelog and version from' - required: true - default: 'master' - type: string - studio_pro_version: - description: 'Studio Pro major version (determines the docs parent folder)' - required: true - default: 'Studio Pro 11.x' - type: choice - options: - - 'Studio Pro 10.x' - - 'Studio Pro 11.x' - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - name: Sync docs fork with upstream - run: gh repo sync MendixMobile/docs --branch development --force - env: - GH_TOKEN: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} - - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.inputs.branch }} - - - uses: actions/setup-node@v3 - with: - node-version-file: .nvmrc - - - name: Install docs release script dependencies - run: npm ci --prefix .github/scripts - - - name: Create release notes PR in mendix/docs Github repository - env: - MENDIX_MOBILE_DOCS_PR_GITHUB_PAT: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} - STUDIO_PRO_MAJOR: ${{ github.event.inputs.studio_pro_version == 'Studio Pro 10.x' && '10' || '11' }} - run: node .github/scripts/release-native-template.mjs \ No newline at end of file