diff --git a/.github/workflows/publish_android_maven_central.yml b/.github/workflows/publish_android_maven_central.yml index eb39a9b..7966ac7 100644 --- a/.github/workflows/publish_android_maven_central.yml +++ b/.github/workflows/publish_android_maven_central.yml @@ -27,23 +27,24 @@ jobs: permissions: contents: read steps: - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - token: ${{ secrets.CAP_GH_RELEASE_TOKEN }} - - 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 + ref: ${{ github.ref_name }} # explicitly set ref to include commit from `semantic-release` + token: ${{ secrets.CAP_GH_RELEASE_TOKEN }} + - 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 diff --git a/.github/workflows/publish_ios_cocoapods_trunk.yml b/.github/workflows/publish_ios_cocoapods_trunk.yml index 27c8e07..b30fd7e 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 @@ -24,6 +24,7 @@ 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: Install Cocoapods run: | 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) } 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