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
38 changes: 38 additions & 0 deletions .github/workflows/publish_pod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Capacitor Plugin to CocoaPods Trunk

on:
workflow_call:
secrets:
COCOAPODS_TRUNK_TOKEN:
required: true
CAP_GH_RELEASE_TOKEN:
required: true
workflow_dispatch:

jobs:
publish-ios:
runs-on: macos-15
if: github.ref == 'refs/heads/main'
timeout-minutes: 30
steps:
- run: sudo xcode-select --switch /Applications/Xcode_26.2.app
- run: xcrun simctl list > /dev/null
- run: xcodebuild -downloadPlatform iOS
- uses: actions/setup-node@v6
with:
node-version: 24
- 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: |
gem install cocoapods
- name: Deploy to Cocoapods
run: |
set -eo pipefail
npm run publish:cocoapod
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
working-directory: ./packages/capacitor-plugin
10 changes: 9 additions & 1 deletion .github/workflows/release_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
GH_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
run: npx semantic-release
run: npx semantic-release

publish-pod:
needs: release
uses: ./.github/workflows/publish_pod.yml
secrets:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
CAP_GH_RELEASE_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}

3 changes: 2 additions & 1 deletion packages/capacitor-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build"
"prepublishOnly": "npm run build",
"publish:cocoapod": "pod trunk push ./CapacitorGeolocation.podspec --allow-warnings"
},
"dependencies": {
"@capacitor/synapse": "^1.0.4"
Expand Down