|
| 1 | +name: Prepare Plugin Releases |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + proxy_version: |
| 7 | + description: 'New Framework Proxy Version (x.y.z)' |
| 8 | + required: true |
| 9 | + ios_version: |
| 10 | + description: 'iOS SDK Version (x.y.z - optional)' |
| 11 | + required: false |
| 12 | + android_version: |
| 13 | + description: 'Android SDK Version (x.y.z - optional)' |
| 14 | + required: false |
| 15 | + test_mode: |
| 16 | + description: 'Test mode (adds -test suffix to branches)' |
| 17 | + type: boolean |
| 18 | + default: false |
| 19 | + react_native: |
| 20 | + description: 'Update React Native' |
| 21 | + type: boolean |
| 22 | + default: true |
| 23 | + cordova: |
| 24 | + description: 'Update Cordova' |
| 25 | + type: boolean |
| 26 | + default: true |
| 27 | + flutter: |
| 28 | + description: 'Update Flutter' |
| 29 | + type: boolean |
| 30 | + default: true |
| 31 | + capacitor: |
| 32 | + description: 'Update Capacitor' |
| 33 | + type: boolean |
| 34 | + default: true |
| 35 | + |
| 36 | +env: |
| 37 | + GITHUB_TOKEN: ${{ secrets.MOBILE_PLUGIN_RELEASE_PAT }} |
| 38 | + |
| 39 | +jobs: |
| 40 | + centralized-plugin-releases: |
| 41 | + runs-on: macos-26-xlarge |
| 42 | + timeout-minutes: 20 |
| 43 | + |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@v4 |
| 46 | + |
| 47 | + - name: Setup Gemini CLI |
| 48 | + uses: google-github-actions/run-gemini-cli@main |
| 49 | + with: |
| 50 | + gemini_api_key: ${{ secrets.GEMINI_API_KEY }} |
| 51 | + continue-on-error: true |
| 52 | + |
| 53 | + - name: Update plugins |
| 54 | + id: update |
| 55 | + run: | |
| 56 | + # Build plugin filter args |
| 57 | + PLUGIN_ARGS="" |
| 58 | + if [ "${{ github.event.inputs.react_native }}" != "true" ]; then |
| 59 | + PLUGIN_ARGS="$PLUGIN_ARGS --skip-react-native" |
| 60 | + fi |
| 61 | + if [ "${{ github.event.inputs.cordova }}" != "true" ]; then |
| 62 | + PLUGIN_ARGS="$PLUGIN_ARGS --skip-cordova" |
| 63 | + fi |
| 64 | + if [ "${{ github.event.inputs.flutter }}" != "true" ]; then |
| 65 | + PLUGIN_ARGS="$PLUGIN_ARGS --skip-flutter" |
| 66 | + fi |
| 67 | + if [ "${{ github.event.inputs.capacitor }}" != "true" ]; then |
| 68 | + PLUGIN_ARGS="$PLUGIN_ARGS --skip-capacitor" |
| 69 | + fi |
| 70 | +
|
| 71 | + # Add test mode flag if enabled |
| 72 | + if [ "${{ github.event.inputs.test_mode }}" = "true" ]; then |
| 73 | + PLUGIN_ARGS="$PLUGIN_ARGS --test" |
| 74 | + fi |
| 75 | +
|
| 76 | + bash ./scripts/update_all_plugins.sh \ |
| 77 | + "${{ github.event.inputs.proxy_version }}" \ |
| 78 | + "${{ github.event.inputs.ios_version }}" \ |
| 79 | + "${{ github.event.inputs.android_version }}" \ |
| 80 | + $PLUGIN_ARGS |
| 81 | + env: |
| 82 | + GITHUB_TOKEN: ${{ secrets.MOBILE_PLUGIN_RELEASE_PAT }} |
| 83 | + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} |
| 84 | + |
| 85 | + - name: Display release summary |
| 86 | + run: | |
| 87 | + cat >> $GITHUB_STEP_SUMMARY << 'EOF' |
| 88 | + ## 📦 Plugin Release Summary |
| 89 | +
|
| 90 | + ### Proxy Version |
| 91 | + **${{ github.event.inputs.proxy_version }}** |
| 92 | +
|
| 93 | + ### SDK Versions |
| 94 | + - iOS: ${{ github.event.inputs.ios_version || 'from proxy' }} |
| 95 | + - Android: ${{ github.event.inputs.android_version || 'from proxy' }} |
| 96 | +
|
| 97 | + ### Plugin PRs |
| 98 | +
|
| 99 | + | Plugin | Version | Status | |
| 100 | + |--------|---------|--------| |
| 101 | + | React Native | ${{ steps.update.outputs.react_native_version }} | ${{ steps.update.outputs.react_native_pr_url }} | |
| 102 | + | Cordova | ${{ steps.update.outputs.cordova_version }} | ${{ steps.update.outputs.cordova_pr_url }} | |
| 103 | + | Flutter | ${{ steps.update.outputs.flutter_version }} | ${{ steps.update.outputs.flutter_pr_url }} | |
| 104 | + | Capacitor | ${{ steps.update.outputs.capacitor_version }} | ${{ steps.update.outputs.capacitor_pr_url }} | |
| 105 | +
|
| 106 | + --- |
| 107 | +
|
| 108 | + ### Next Steps |
| 109 | + 1. Review each plugin PR (links above) |
| 110 | + 2. Merge when ready |
| 111 | +
|
| 112 | + ⚠️ **Validation Note:** Changelogs across plugins will be similar since they update the same underlying SDKs. This is expected and correct. |
| 113 | + EOF |
| 114 | +
|
| 115 | + - name: Notify Slack (Success) |
| 116 | + if: success() |
| 117 | + run: | |
| 118 | + curl -X POST ${{ secrets.MOBILE_SLACK_WEBHOOK }} \ |
| 119 | + -H 'Content-Type: application/json' \ |
| 120 | + -d '{ |
| 121 | + "text": "✅ Centralized plugin releases complete for proxy v${{ github.event.inputs.proxy_version }}\n• React Native v${{ steps.update.outputs.react_native_version }}: ${{ steps.update.outputs.react_native_pr_url }}\n• Cordova v${{ steps.update.outputs.cordova_version }}: ${{ steps.update.outputs.cordova_pr_url }}\n• Flutter v${{ steps.update.outputs.flutter_version }}: ${{ steps.update.outputs.flutter_pr_url }}\n• Capacitor v${{ steps.update.outputs.capacitor_version }}: ${{ steps.update.outputs.capacitor_pr_url }}\n@mobile-team" |
| 122 | + }' || true |
| 123 | +
|
| 124 | + - name: Notify Slack (Failure) |
| 125 | + if: failure() |
| 126 | + run: | |
| 127 | + curl -X POST ${{ secrets.MOBILE_SLACK_WEBHOOK }} \ |
| 128 | + -H 'Content-Type: application/json' \ |
| 129 | + -d '{ |
| 130 | + "text": "❌ Centralized plugin release failed\nProxy version: ${{ github.event.inputs.proxy_version }}\nWorkflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n<@crow>" |
| 131 | + }' || true |
0 commit comments