Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a473b8e
feat: add Braze-12 kit
denischilik Feb 16, 2026
195cf2f
Update deployment targets
denischilik Feb 16, 2026
ada2989
fix trunk checks
denischilik Feb 16, 2026
842f894
remove empty line
denischilik Feb 16, 2026
64b8a74
ignore CHANGELOG.md
denischilik Feb 16, 2026
bce424f
add workflow for pushing to mP integrations
nickolas-dimitrakas Feb 16, 2026
16433a6
get workflow to appear in github ui
nickolas-dimitrakas Feb 16, 2026
aeee403
Update mirror-kits-poc.yml
nickolas-dimitrakas Feb 16, 2026
2b68ae4
add repo depth to token
nickolas-dimitrakas Feb 16, 2026
0afd5aa
add debug step
nickolas-dimitrakas Feb 16, 2026
6455eeb
Update mirror-kits-poc.yml
nickolas-dimitrakas Feb 16, 2026
d6c3e1d
Update mirror-kits-poc.yml
nickolas-dimitrakas Feb 16, 2026
6cb653e
simulate change in kit
nickolas-dimitrakas Feb 16, 2026
2e70e56
use force push for first job otherwise not
nickolas-dimitrakas Feb 16, 2026
7093953
Revert "simulate change in kit"
nickolas-dimitrakas Feb 16, 2026
35228ba
Revert "use force push for first job otherwise not"
nickolas-dimitrakas Feb 16, 2026
4662b73
PoC for tagging a release
nickolas-dimitrakas Feb 16, 2026
630b2a0
adjust version number
nickolas-dimitrakas Feb 16, 2026
ae69fe4
git identity for tag
nickolas-dimitrakas Feb 16, 2026
fce0c5d
clean up release ecosystem workflow
nickolas-dimitrakas Feb 17, 2026
dc86912
add ci manual PR to trigger release
nickolas-dimitrakas Feb 17, 2026
0004859
implement temp dry run and xcframework artifacts
nickolas-dimitrakas Feb 17, 2026
3eef34f
adjust for failing signing
nickolas-dimitrakas Feb 17, 2026
696b337
restore xcframework script
nickolas-dimitrakas Feb 17, 2026
071b965
remove core release from script
nickolas-dimitrakas Feb 17, 2026
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
180 changes: 180 additions & 0 deletions .github/workflows/release-ecosystem-from-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
name: Release mParticle Ecosystem

on:
push:
# TODO: Remove ci/** after testing
branches:
- main
- "ci/**"
paths:
- "VERSION"
- ".github/workflows/release-ecosystem-from-main.yml"
workflow_dispatch:
inputs:
dry_run:
description: "Dry run — skip creating real releases/tags"
type: boolean
default: true

env:
# TODO: Remove after testing
DRY_RUN: true

permissions:
contents: write

jobs:
prepare:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
tag: ${{ steps.version.outputs.tag }}
steps:
- uses: actions/checkout@v6

- name: Get ecosystem version
id: version
run: |
VERSION=$(head -n 1 VERSION | tr -d '\r\n ')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=v$VERSION" >> $GITHUB_OUTPUT
echo "📌 Ecosystem version: $VERSION"

mirror-and-release-kits:
needs: prepare
runs-on: macOS-15
env:
DEST_ORG: mparticle-integrations
XCODE_VERSION: "16.4"
strategy:
fail-fast: false
matrix:
kit:
- name: braze-12
local_path: kits/braze/braze-12
dest_repo: mparticle-apple-integration-braze-12
ios_scheme: mParticle-Appboy
module: mParticle_Appboy
# - name: braze-13
# local_path: kits/braze/braze-13
# dest_repo: mparticle-apple-integration-braze-13
# ios_scheme: mParticle-Appboy
# module: mParticle_Appboy
# - name: braze-14
# local_path: kits/braze/braze-14
# dest_repo: mparticle-apple-integration-braze-14
# ios_scheme: mParticle-Appboy
# module: mParticle_Appboy

steps:
- name: Checkout monorepo
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app

- name: Build kit xcframework from Package.swift
working-directory: ${{ matrix.kit.local_path }}
run: |
MODULE="${{ matrix.kit.module }}"
SCHEME="${{ matrix.kit.ios_scheme }}"

xcodebuild archive -scheme "$SCHEME" \
-destination "generic/platform=iOS" -archivePath "archives/iOS"
xcodebuild archive -scheme "$SCHEME" \
-destination "generic/platform=iOS Simulator" -archivePath "archives/iOS_Simulator"

XCFRAMEWORK_ARGS=(
-archive archives/iOS.xcarchive -framework "${MODULE}.framework"
-archive archives/iOS_Simulator.xcarchive -framework "${MODULE}.framework"
)

xcodebuild -create-xcframework "${XCFRAMEWORK_ARGS[@]}" -output "${MODULE}.xcframework"
zip -r "${MODULE}.xcframework.zip" "${MODULE}.xcframework"
rm -rf archives "${MODULE}.xcframework"

- name: Configure Git
run: |
git config user.name "mParticle Bot"
git config user.email "developers@mparticle.com"

- name: Generate GitHub App Token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.SDK_RELEASE_GITHUB_APP_ID }}
private-key: ${{ secrets.SDK_RELEASE_GITHUB_APP_PRIVATE_KEY }}
owner: ${{ env.DEST_ORG }}
repositories: ${{ matrix.kit.dest_repo }}
permission-contents: write

- name: Extract kit release notes
id: release-notes
uses: ffurrer2/extract-release-notes@202313ec7461b6b9e401996714484690ab1ae105 # v3.0.0
with:
changelog_file: ${{ matrix.kit.local_path }}/CHANGELOG.md

- name: Split kit and push to mirror
id: mirror
run: |
SPLIT_BRANCH="split/${{ matrix.kit.name }}"
git subtree split --prefix ${{ matrix.kit.local_path }} -b "${SPLIT_BRANCH}"

- name: Checkout destination repo
uses: actions/checkout@v6
with:
repository: ${{ env.DEST_ORG }}/${{ matrix.kit.dest_repo }}
token: ${{ steps.generate-token.outputs.token }}
path: dest

- name: Push split to destination
if: env.DRY_RUN != 'true'
id: push
run: |
git -C dest fetch "$GITHUB_WORKSPACE" "split/${{ matrix.kit.name }}:refs/heads/incoming"
git -C dest reset --hard incoming
git -C dest push origin main --force
echo "sha=$(git -C dest rev-parse HEAD)" >> $GITHUB_OUTPUT

- name: Create GitHub release on mirror
if: env.DRY_RUN != 'true'
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
with:
tag: ${{ needs.prepare.outputs.tag }}
commit: ${{ steps.push.outputs.sha }}
owner: ${{ env.DEST_ORG }}
repo: ${{ matrix.kit.dest_repo }}
token: ${{ steps.generate-token.outputs.token }}
artifacts: ${{ matrix.kit.local_path }}/${{ matrix.kit.module }}.xcframework.zip
body: |
${{ steps.release-notes.outputs.release_notes }}

- name: Dry run summary
if: env.DRY_RUN == 'true'
run: |
COMMITS=$(git log "split/${{ matrix.kit.name }}" --oneline -5)
cat >> $GITHUB_STEP_SUMMARY <<EOF
## 🏜️ DRY RUN — Kit Mirror: ${{ matrix.kit.name }}

| Property | Value |
|----------|-------|
| **Kit** | \`${{ matrix.kit.name }}\` |
| **Source** | \`${{ matrix.kit.local_path }}\` |
| **Destination** | \`${{ env.DEST_ORG }}/${{ matrix.kit.dest_repo }}\` |
| **Tag** | \`${{ needs.prepare.outputs.tag }}\` |
| **Artifact** | \`${{ matrix.kit.module }}.xcframework.zip\` |

### Split branch commits
\`\`\`
${COMMITS}
\`\`\`

### Release notes
${{ steps.release-notes.outputs.release_notes }}
EOF

- name: Cleanup split branch
if: always()
run: git branch -D "split/${{ matrix.kit.name }}" || true
185 changes: 185 additions & 0 deletions .github/workflows/sdk-release-ecosystem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
name: iOS SDK Ecosystem Release

on:
workflow_dispatch:
inputs:
bump-type:
description: "Version bump type"
required: true
type: choice
options:
- patch
- minor
- major

jobs:
confirm-main-branch:
name: Confirm release is run from main branch
uses: mParticle/mparticle-workflows/.github/workflows/sdk-release-repo-branch-check.yml@stable

release:
name: Create release PR
runs-on: macOS-15
needs: confirm-main-branch
env:
GITHUB_TOKEN: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }}
steps:
- name: Checkout main branch
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }}
ref: main

- name: Get current version from latest tag
id: current-version
run: |
CURRENT_VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo "0.0.0")
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT

- name: Bump version
id: bump-version
uses: actions-ecosystem/action-bump-semver@v1
with:
current_version: ${{ steps.current-version.outputs.version }}
level: ${{ github.event.inputs.bump-type }}

- name: Set version environment variables
run: |
VERSION=$(echo "${{ steps.bump-version.outputs.new_version }}" | sed 's/^v//')
MAJOR=$(echo "$VERSION" | cut -d. -f1)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "MAJOR=$MAJOR" >> $GITHUB_ENV
echo "📌 ${{ steps.current-version.outputs.version }} → $VERSION (${{ github.event.inputs.bump-type }})"

- name: Setup git config
run: |
git config user.email "developers@mparticle.com"
git config user.name "mParticle Automation"

- name: Create release branch
run: |
git push origin --delete chore/release-v${VERSION} 2>/dev/null || true
git checkout -b chore/release-v${VERSION}

- name: Generate changelog entry
run: |
PREV_TAG="v${{ steps.current-version.outputs.version }}"
if [ "$PREV_TAG" = "v0.0.0" ]; then PREV_TAG=""; fi
DATE=$(date +%Y-%m-%d)

echo "# [${VERSION}](https://github.com/mParticle/mparticle-apple-sdk/compare/${PREV_TAG}...v${VERSION}) (${DATE})" > /tmp/changelog_entry.md
echo "" >> /tmp/changelog_entry.md

if [ -n "$PREV_TAG" ]; then
FIXES=$(git log ${PREV_TAG}..HEAD --pretty=format:"- %s ([%h](https://github.com/mParticle/mparticle-apple-sdk/commit/%H))" --grep="^fix" --regexp-ignore-case 2>/dev/null || true)
if [ -n "$FIXES" ]; then
echo -e "### Bug Fixes\n\n$FIXES\n" >> /tmp/changelog_entry.md
fi

FEATURES=$(git log ${PREV_TAG}..HEAD --pretty=format:"- %s ([%h](https://github.com/mParticle/mparticle-apple-sdk/commit/%H))" --grep="^feat" --regexp-ignore-case 2>/dev/null || true)
if [ -n "$FEATURES" ]; then
echo -e "### Features\n\n$FEATURES\n" >> /tmp/changelog_entry.md
fi

if [ -z "$FIXES" ] && [ -z "$FEATURES" ]; then
OTHER=$(git log ${PREV_TAG}..HEAD --pretty=format:"- %s ([%h](https://github.com/mParticle/mparticle-apple-sdk/commit/%H))" 2>/dev/null || true)
if [ -n "$OTHER" ]; then
echo -e "### Changes\n\n$OTHER\n" >> /tmp/changelog_entry.md
fi
fi
else
echo -e "### Initial Release\n" >> /tmp/changelog_entry.md
fi

if [ -f CHANGELOG.md ]; then
cat /tmp/changelog_entry.md CHANGELOG.md > /tmp/new_changelog.md
mv /tmp/new_changelog.md CHANGELOG.md
else
mv /tmp/changelog_entry.md CHANGELOG.md
fi

- name: Update VERSION file
run: echo "$VERSION" > VERSION

- name: Update version in all podspecs
run: |
find . -name "*.podspec" -exec \
sed -i '' 's/\(s\.version[^=]*=[[:space:]]*\)"[^"]*"/\1"'"${VERSION}"'"/' {} +

- name: Update version in MPIConstants.m
run: sed -i '' "s/kMParticleSDKVersion = @\"[^\"]*\"/kMParticleSDKVersion = @\"${VERSION}\"/" mParticle-Apple-SDK/MPIConstants.m

- name: Update version in MPConstants.swift
run: sed -i '' "s/let kMParticleSDKVersion = \"[^\"]*\"/let kMParticleSDKVersion = \"${VERSION}\"/" mParticle-Apple-SDK/MPConstants.swift

- name: Update version in Info.plist
run: /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${VERSION}" Framework/Info.plist

- name: Update SDK version in integration test mappings
run: ./Scripts/update_mapping_versions.sh "${VERSION}"

- name: Update kit dependency on core SDK for major release
if: github.event.inputs.bump-type == 'major'
run: |
# Podspec: '~> X.Y' → '~> MAJOR.0'
find kits -name "*.podspec" -exec \
sed -i '' "s/'mParticle-Apple-SDK', '~> [^']*'/'mParticle-Apple-SDK', '~> ${MAJOR}.0'/" {} +

# Package.swift: .upToNextMajor(from: "X.Y.Z") → .upToNextMajor(from: "MAJOR.0.0")
find kits -name "Package.swift" -exec \
sed -i '' "/mparticle-apple-sdk/{
n
s/.upToNextMajor(from: \"[^\"]*\")/.upToNextMajor(from: \"${MAJOR}.0.0\")/
s/branch: \"[^\"]*\"/.upToNextMajor(from: \"${MAJOR}.0.0\")/
}" {} +

# --- Commit, push, and create PR ---

- name: Commit version changes
run: |
trunk fmt
git add \
VERSION \
CHANGELOG.md \
Framework/Info.plist \
mParticle-Apple-SDK.podspec \
mParticle-Apple-SDK-Swift/mParticle-Apple-SDK-Swift.podspec \
mParticle-Apple-SDK/MPConstants.swift \
mParticle-Apple-SDK/MPIConstants.m \
IntegrationTests/wiremock-recordings/mappings/*.json \
kits/

git commit -m "chore: (release) ${VERSION}

Updates version to ${VERSION} across the mParticle ecosystem."

- name: Push release branch
run: git push origin chore/release-v${VERSION}

- name: Create Pull Request
env:
GH_TOKEN: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }}
run: |
gh pr create \
--base main \
--head chore/release-v${VERSION} \
--title "chore: Release v${VERSION}" \
--body "## Release v${VERSION}

### Bump type: \`${{ github.event.inputs.bump-type }}\`

This PR contains the version bump and changelog updates for release ${VERSION}.

### Files updated
- All podspecs (core, Swift, kits) → \`${VERSION}\`
- \`mParticle-Apple-SDK/MPIConstants.m\`
- \`mParticle-Apple-SDK/MPConstants.swift\`
- \`Framework/Info.plist\`
- \`CHANGELOG.md\`
- Integration test mappings

---

**On merge:** The [Release mParticle Ecosystem](https://github.com/mParticle/mparticle-apple-sdk/actions/workflows/release-ecosystem-from-main.yml) workflow will automatically create tags and GitHub releases for the core SDK and all mirrored kit repos." \
--reviewer mParticle/sdk-team
1 change: 1 addition & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ lint:
- linters: [markdownlint]
paths:
- CHANGELOG.md # Standard changelog format violates MD001, MD024, MD025
- kits/braze/braze-12/CHANGELOG.md

actions:
enabled:
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8.42.2
Loading
Loading