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
131 changes: 131 additions & 0 deletions .github/workflows/prep-plugin-releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Prepare Plugin Releases

on:
workflow_dispatch:
inputs:
proxy_version:
description: 'New Framework Proxy Version (x.y.z)'
required: true
ios_version:
description: 'iOS SDK Version (x.y.z - optional)'
required: false
android_version:
description: 'Android SDK Version (x.y.z - optional)'
required: false
test_mode:
description: 'Test mode (adds -test suffix to branches)'
type: boolean
default: false
react_native:
description: 'Update React Native'
type: boolean
default: true
cordova:
description: 'Update Cordova'
type: boolean
default: true
flutter:
description: 'Update Flutter'
type: boolean
default: true
capacitor:
description: 'Update Capacitor'
type: boolean
default: true

env:
GITHUB_TOKEN: ${{ secrets.MOBILE_PLUGIN_RELEASE_PAT }}

jobs:
centralized-plugin-releases:
runs-on: macos-26-xlarge
timeout-minutes: 20

steps:
- uses: actions/checkout@v4

- name: Setup Gemini CLI
uses: google-github-actions/run-gemini-cli@main
with:
gemini_api_key: ${{ secrets.GEMINI_API_KEY }}
continue-on-error: true

- name: Update plugins
id: update
run: |
# Build plugin filter args
PLUGIN_ARGS=""
if [ "${{ github.event.inputs.react_native }}" != "true" ]; then
PLUGIN_ARGS="$PLUGIN_ARGS --skip-react-native"
fi
if [ "${{ github.event.inputs.cordova }}" != "true" ]; then
PLUGIN_ARGS="$PLUGIN_ARGS --skip-cordova"
fi
if [ "${{ github.event.inputs.flutter }}" != "true" ]; then
PLUGIN_ARGS="$PLUGIN_ARGS --skip-flutter"
fi
if [ "${{ github.event.inputs.capacitor }}" != "true" ]; then
PLUGIN_ARGS="$PLUGIN_ARGS --skip-capacitor"
fi

# Add test mode flag if enabled
if [ "${{ github.event.inputs.test_mode }}" = "true" ]; then
PLUGIN_ARGS="$PLUGIN_ARGS --test"
fi

bash ./scripts/update_all_plugins.sh \
"${{ github.event.inputs.proxy_version }}" \
"${{ github.event.inputs.ios_version }}" \
"${{ github.event.inputs.android_version }}" \
$PLUGIN_ARGS
env:
GITHUB_TOKEN: ${{ secrets.MOBILE_PLUGIN_RELEASE_PAT }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}

- name: Display release summary
run: |
cat >> $GITHUB_STEP_SUMMARY << 'EOF'
## 📦 Plugin Release Summary

### Proxy Version
**${{ github.event.inputs.proxy_version }}**

### SDK Versions
- iOS: ${{ github.event.inputs.ios_version || 'from proxy' }}
- Android: ${{ github.event.inputs.android_version || 'from proxy' }}

### Plugin PRs

| Plugin | Version | Status |
|--------|---------|--------|
| React Native | ${{ steps.update.outputs.react_native_version }} | ${{ steps.update.outputs.react_native_pr_url }} |
| Cordova | ${{ steps.update.outputs.cordova_version }} | ${{ steps.update.outputs.cordova_pr_url }} |
| Flutter | ${{ steps.update.outputs.flutter_version }} | ${{ steps.update.outputs.flutter_pr_url }} |
| Capacitor | ${{ steps.update.outputs.capacitor_version }} | ${{ steps.update.outputs.capacitor_pr_url }} |

---

### Next Steps
1. Review each plugin PR (links above)
2. Merge when ready

⚠️ **Validation Note:** Changelogs across plugins will be similar since they update the same underlying SDKs. This is expected and correct.
EOF

- name: Notify Slack (Success)
if: success()
run: |
curl -X POST ${{ secrets.MOBILE_SLACK_WEBHOOK }} \
-H 'Content-Type: application/json' \
-d '{
"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"
}' || true

- name: Notify Slack (Failure)
if: failure()
run: |
curl -X POST ${{ secrets.MOBILE_SLACK_WEBHOOK }} \
-H 'Content-Type: application/json' \
-d '{
"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>"
}' || true
107 changes: 107 additions & 0 deletions .github/workflows/prep-proxy-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Prepare Proxy Release

on:
workflow_dispatch:

env:
BUNDLE_PATH: vendor/bundle

jobs:
prepare-release:
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- uses: actions/checkout@v4

- name: Detect SDK versions
id: detect
run: |
./scripts/detect_sdk_versions.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Display version summary
run: |
cat >> $GITHUB_STEP_SUMMARY << 'EOF'
## 📦 Proxy Release Summary

| Component | Current | New |
|-----------|---------|-----|
| **Proxy** | - | **${{ steps.detect.outputs.proxy_version }}** |
| **iOS SDK** | - | ${{ steps.detect.outputs.ios_version }} |
| **Android SDK** | - | ${{ steps.detect.outputs.android_version }} |

**Bump Type:** `${{ steps.detect.outputs.bump_type }}`

---

Preparing release PR...
EOF

- name: Prepare release
run: |
./scripts/prep_proxy_release.sh

- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: |
Release ${{ steps.detect.outputs.proxy_version }}

- Updated iOS SDK to ${{ steps.detect.outputs.ios_version }}
- Updated Android SDK to ${{ steps.detect.outputs.android_version }}
branch: proxy-${{ steps.detect.outputs.proxy_version }}
delete-branch: true
title: Release ${{ steps.detect.outputs.proxy_version }}
body: |
## Proxy Release ${{ steps.detect.outputs.proxy_version }}

Automated release PR for proxy version bump.

### SDK Updates
- iOS SDK: ${{ steps.detect.outputs.ios_version }}
- Android SDK: ${{ steps.detect.outputs.android_version }}

---

🤖 Generated by prep-proxy-release workflow
labels: |
release
automated pr

- name: Update summary with PR link
if: steps.cpr.outputs.pull-request-number
run: |
cat >> $GITHUB_STEP_SUMMARY << 'EOF'

## ✅ Release PR Created

**PR:** [#${{ steps.cpr.outputs.pull-request-number }}](${{ steps.cpr.outputs.pull-request-url }})

### Next Steps
1. Review the PR
2. Merge when ready
3. Tag will be created automatically
4. Run `prep-plugin-releases` workflow with version `${{ steps.detect.outputs.proxy_version }}`
EOF

- name: Notify Slack (Success)
if: success() && steps.cpr.outputs.pull-request-number
run: |
curl -X POST ${{ secrets.MOBILE_SLACK_WEBHOOK }} \
-H 'Content-Type: application/json' \
-d '{
"text": "✅ Proxy release PR created: ${{ steps.cpr.outputs.pull-request-url }}\nVersion: ${{ steps.detect.outputs.proxy_version }}\niOS: ${{ steps.detect.outputs.ios_version }} | Android: ${{ steps.detect.outputs.android_version }}"
}' || true

- name: Notify Slack (Failure)
if: failure()
run: |
curl -X POST ${{ secrets.MOBILE_SLACK_WEBHOOK }} \
-H 'Content-Type: application/json' \
-d '{
"text": "❌ Proxy release preparation failed\nWorkflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n<@crow>"
}' || true
Loading
Loading