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
28 changes: 28 additions & 0 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ jobs:
body: |
${{ steps.release-notes.outputs.release_notes }}

- name: Publish to CocoaPods
if: env.DRY_RUN != 'true'
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: pod trunk push mParticle-Apple-SDK.podspec --allow-warnings --synchronous

- name: Summary
run: |
ARTIFACTS=$(ls *.zip 2>/dev/null | tr '\n' ', ' | sed 's/,$//')
Expand Down Expand Up @@ -305,3 +311,25 @@ jobs:
### Release notes
${{ steps.release-notes.outputs.release_notes }}
EOF

# ──────────────────────────────────────────────
# CocoaPods: publish each kit to trunk
# ──────────────────────────────────────────────
publish-kit-cocoapods:
name: Publish ${{ matrix.kit.name }} to CocoaPods
needs: [load-matrix, mirror-and-release-kits, release-core-sdk]
runs-on: macos-15
if: ${{ !inputs.dry_run }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kit CocoaPods job skipped on manual non-dry-run dispatch

Medium Severity

The if: ${{ !inputs.dry_run }} condition on publish-kit-cocoapods uses the inputs context, where workflow_dispatch boolean inputs are strings ('true'/'false'), not actual booleans. Since 'false' is a non-empty string (truthy), !'false' evaluates to false, causing the entire job to be silently skipped when a user manually triggers the workflow with dry_run unchecked. Every other dry-run guard in this workflow uses the reliable env.DRY_RUN != 'true' pattern at step level, which correctly handles the string representation.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2d3e273. Configure here.

strategy:
fail-fast: false
matrix:
kit: ${{ fromJson(needs.load-matrix.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Publish to CocoaPods
if: matrix.kit.podspec != ''
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: pod trunk push ${{ matrix.kit.podspec }} --allow-warnings --synchronous
43 changes: 25 additions & 18 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
# Release Process

## 1. Draft the release
## 1. Refresh the CocoaPods trunk token

> [!IMPORTANT]
> The `COCOAPODS_TRUNK_TOKEN` secret in this repository expires after ~3 days. **Refresh it before every release.**

1. Generate a new session token:
```bash
pod trunk register developers@mparticle.com 'mParticle Developers' --description='CI release'
```
Confirm via the email link, then retrieve the token:
```bash
grep -A2 'trunk.cocoapods.org' ~/.netrc | grep password | awk '{print $2}'
```
2. Update the `COCOAPODS_TRUNK_TOKEN` secret in **Settings → Secrets and variables → Actions** on this repository.

## 2. Draft the release

1. Go to **Actions → Release – Draft** in GitHub
2. Select the bump type (`patch`, `minor`, or `major`) and run the workflow from `main`

This bumps versions across podspecs, `Package.swift`, constants files, and `CHANGELOG.md`, then opens a release PR against `main`.

## 2. Merge the release PR
## 3. Merge the release PR

Review and merge the PR. On merge, the **Release – Publish** workflow runs automatically:

- Builds xcframeworks for every kit
- Mirrors each kit subtree to its own repo under `mparticle-integrations/`
- Creates GitHub releases and tags (used by SPM consumers)

## 3. Publish to CocoaPods

> [!IMPORTANT]
> This is a **manual** step. Wait for the Release – Publish workflow to finish before running — kit mirror repos and GitHub tags must exist first.

```bash
# Register a trunk session if you don't have one (expires after ~3 days):
pod trunk register developers@mparticle.com 'mParticle Developers' --description='<your machine>'
# (confirm via email link)

# Publish everything:
./Scripts/pod_publish.sh
```

This pushes the Swift SDK and core SDK podspecs sequentially, then all kit podspecs in parallel.
- Publishes the core SDK and all kit podspecs to CocoaPods trunk

> [!NOTE]
> The Swift SDK podspec (`mParticle-Apple-SDK-Swift`) is not yet published automatically — push it manually before the core SDK if required:
>
> ```bash
> pod trunk push mParticle-Apple-SDK-Swift/mParticle-Apple-SDK-Swift.podspec --allow-warnings
> ```

## Post-release verification

Expand Down
39 changes: 0 additions & 39 deletions Scripts/pod_publish.sh

This file was deleted.

Loading