From cc590753e39e7b0a22f3107ac9bbeb35c4370b77 Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Wed, 10 Dec 2025 11:35:33 +0000 Subject: [PATCH 1/6] chore(ci): Pull from main before publish to android / iOS `semantic-release` in `release.plugin.yml` creates a commit that is necessary for the native publish (version update), but those workflows still reference the the (older) commit from triggering the release GitHub action. By pull, we make sure main is synced when trying to release. --- .github/workflows/publish_android_maven_central.yml | 2 ++ .github/workflows/publish_ios_cocoapods_trunk.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/publish_android_maven_central.yml b/.github/workflows/publish_android_maven_central.yml index eb39a9b..1d015da 100644 --- a/.github/workflows/publish_android_maven_central.yml +++ b/.github/workflows/publish_android_maven_central.yml @@ -31,6 +31,8 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CAP_GH_RELEASE_TOKEN }} + - name: Pull latest commits + run: git pull origin main - name: set up JDK 21 uses: actions/setup-java@v5 with: diff --git a/.github/workflows/publish_ios_cocoapods_trunk.yml b/.github/workflows/publish_ios_cocoapods_trunk.yml index 27c8e07..91a10a5 100644 --- a/.github/workflows/publish_ios_cocoapods_trunk.yml +++ b/.github/workflows/publish_ios_cocoapods_trunk.yml @@ -25,6 +25,8 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CAP_GH_RELEASE_TOKEN }} + - name: Pull latest commits + run: git pull origin main - name: Install Cocoapods run: | gem install cocoapods From 9c1045d4d4d3b545c8e2239055bc18ce4ec99fe3 Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Wed, 10 Dec 2025 11:36:46 +0000 Subject: [PATCH 2/6] ci: Use Xcode 26 for ios publish --- .github/workflows/publish_ios_cocoapods_trunk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish_ios_cocoapods_trunk.yml b/.github/workflows/publish_ios_cocoapods_trunk.yml index 91a10a5..7937ee7 100644 --- a/.github/workflows/publish_ios_cocoapods_trunk.yml +++ b/.github/workflows/publish_ios_cocoapods_trunk.yml @@ -15,7 +15,7 @@ jobs: if: github.ref == 'refs/heads/main' timeout-minutes: 30 steps: - - run: sudo xcode-select --switch /Applications/Xcode_16.app + - run: sudo xcode-select --switch /Applications/Xcode_26.0.app - run: xcrun simctl list > /dev/null - run: xcodebuild -downloadPlatform iOS - uses: actions/setup-node@v6 From 394743bd630c566bca43d54f5b2446e2a8427fb8 Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Wed, 10 Dec 2025 12:01:27 +0000 Subject: [PATCH 3/6] chore(ios): Detection of stable version in pods --- scripts/publish-ios.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish-ios.sh b/scripts/publish-ios.sh index 80d4e7f..7d5b2a2 100755 --- a/scripts/publish-ios.sh +++ b/scripts/publish-ios.sh @@ -23,7 +23,7 @@ publish_plugin_ios () { fi # check if version already exists in Trunk - if pod trunk info "$POD_NAME" 2>/dev/null | grep -q " - $PLUGIN_VERSION"; then + if pod trunk info "$POD_NAME" 2>/dev/null | grep -q " - $PLUGIN_VERSION ("; then printf %"s\n\n" "Duplicate: a published plugin $PLUGIN_NAME exists for version $PLUGIN_VERSION, skipping..." return fi From ae018f41cc841a7ffffde904b593e681a563e018 Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Wed, 10 Dec 2025 14:19:59 +0000 Subject: [PATCH 4/6] chore(android): Fix local properties location --- scripts/android/publish-root.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/android/publish-root.gradle b/scripts/android/publish-root.gradle index 2d1f030..00d8cd5 100644 --- a/scripts/android/publish-root.gradle +++ b/scripts/android/publish-root.gradle @@ -6,9 +6,10 @@ ext["centralTokenUsername"] = '' ext["centralTokenPassword"] = '' ext["sonatypeStagingProfileId"] = '' -File globalSecretPropsFile = file('../../scripts/android/local.properties') +File globalSecretPropsFile = file('../scripts/android/local.properties') File secretPropsFile = project.rootProject.file('local.properties') if (globalSecretPropsFile.exists()) { + println "Reading globalSecretPropsFile" // Read global local.properties file first if it exists (scripts/android/local.properties) Properties p = new Properties() new FileInputStream(globalSecretPropsFile).withCloseable { is -> p.load(is) } From 3b0cbdad8715c67ae4b788837a119bbd1cc962dc Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Mon, 15 Dec 2025 11:51:01 +0000 Subject: [PATCH 5/6] refactor(ci): Indent publish android steps --- .../publish_android_maven_central.yml | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/publish_android_maven_central.yml b/.github/workflows/publish_android_maven_central.yml index 1d015da..4f383f8 100644 --- a/.github/workflows/publish_android_maven_central.yml +++ b/.github/workflows/publish_android_maven_central.yml @@ -27,25 +27,25 @@ jobs: permissions: contents: read steps: - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - token: ${{ secrets.CAP_GH_RELEASE_TOKEN }} - - name: Pull latest commits - run: git pull origin main - - name: set up JDK 21 - uses: actions/setup-java@v5 - with: - java-version: '21' - distribution: 'zulu' - - name: Grant execute permission for publishing script - run: chmod +x ./scripts/publish-android.sh - - name: Run publish script - env: - ANDROID_CENTRAL_USERNAME: ${{ secrets.ANDROID_CENTRAL_USERNAME }} - ANDROID_CENTRAL_PASSWORD: ${{ secrets.ANDROID_CENTRAL_PASSWORD }} - ANDROID_SIGNING_KEY_ID: ${{ secrets.ANDROID_SIGNING_KEY_ID }} - ANDROID_SIGNING_PASSWORD: ${{ secrets.ANDROID_SIGNING_PASSWORD }} - ANDROID_SIGNING_KEY: ${{ secrets.ANDROID_SIGNING_KEY }} - ANDROID_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.ANDROID_SONATYPE_STAGING_PROFILE_ID }} - run: ./scripts/publish-android.sh + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + token: ${{ secrets.CAP_GH_RELEASE_TOKEN }} + - name: Pull latest commits + run: git pull origin main + - name: set up JDK 21 + uses: actions/setup-java@v5 + with: + java-version: '21' + distribution: 'zulu' + - name: Grant execute permission for publishing script + run: chmod +x ./scripts/publish-android.sh + - name: Run publish script + env: + ANDROID_CENTRAL_USERNAME: ${{ secrets.ANDROID_CENTRAL_USERNAME }} + ANDROID_CENTRAL_PASSWORD: ${{ secrets.ANDROID_CENTRAL_PASSWORD }} + ANDROID_SIGNING_KEY_ID: ${{ secrets.ANDROID_SIGNING_KEY_ID }} + ANDROID_SIGNING_PASSWORD: ${{ secrets.ANDROID_SIGNING_PASSWORD }} + ANDROID_SIGNING_KEY: ${{ secrets.ANDROID_SIGNING_KEY }} + ANDROID_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.ANDROID_SONATYPE_STAGING_PROFILE_ID }} + run: ./scripts/publish-android.sh From 4d428c8dbe9269ca438cd67212fbb2337b8cb41d Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Mon, 15 Dec 2025 11:51:27 +0000 Subject: [PATCH 6/6] chore(ci): Simplify syncing main branch for native publish --- .github/workflows/publish_android_maven_central.yml | 3 +-- .github/workflows/publish_ios_cocoapods_trunk.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish_android_maven_central.yml b/.github/workflows/publish_android_maven_central.yml index 4f383f8..7966ac7 100644 --- a/.github/workflows/publish_android_maven_central.yml +++ b/.github/workflows/publish_android_maven_central.yml @@ -30,9 +30,8 @@ jobs: - uses: actions/checkout@v5 with: fetch-depth: 0 + ref: ${{ github.ref_name }} # explicitly set ref to include commit from `semantic-release` token: ${{ secrets.CAP_GH_RELEASE_TOKEN }} - - name: Pull latest commits - run: git pull origin main - name: set up JDK 21 uses: actions/setup-java@v5 with: diff --git a/.github/workflows/publish_ios_cocoapods_trunk.yml b/.github/workflows/publish_ios_cocoapods_trunk.yml index 7937ee7..b30fd7e 100644 --- a/.github/workflows/publish_ios_cocoapods_trunk.yml +++ b/.github/workflows/publish_ios_cocoapods_trunk.yml @@ -24,9 +24,8 @@ jobs: - uses: actions/checkout@v5 with: fetch-depth: 0 + ref: ${{ github.ref_name }} # explicitly set ref to include commit from `semantic-release` token: ${{ secrets.CAP_GH_RELEASE_TOKEN }} - - name: Pull latest commits - run: git pull origin main - name: Install Cocoapods run: | gem install cocoapods