Skip to content

Update podspec source tag format, adjust CI cache paths, and bump arc… #3

Update podspec source tag format, adjust CI cache paths, and bump arc…

Update podspec source tag format, adjust CI cache paths, and bump arc… #3

Workflow file for this run

name: Release to CocoaPods
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
release:
runs-on: macos-15
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get Ruby version
id: ruby-version
run: echo "version=$(cat .ruby-version)" >> $GITHUB_OUTPUT
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ steps.ruby-version.outputs.version }}
bundler-cache: true
- name: Validate version matches tag
run: |
# Extract version from podspec
PODSPEC_VERSION=$(grep "s.version " arclight-event-tracker.podspec | sed -n "s/.*'\([^']*\)'.*/\1/p")
# Extract version from git tag
GIT_TAG_VERSION=${GITHUB_REF#refs/tags/}
echo "Podspec version: $PODSPEC_VERSION"
echo "Git tag version: $GIT_TAG_VERSION"
if [ "$PODSPEC_VERSION" != "$GIT_TAG_VERSION" ]; then
echo "❌ Version mismatch! Podspec version ($PODSPEC_VERSION) doesn't match git tag version ($GIT_TAG_VERSION)"
exit 1
fi
echo "✅ Version validation passed"
- name: Validate podspec
run: |
bundle exec pod lib lint arclight-event-tracker.podspec --allow-warnings --verbose
- name: Push to CocoaPods
run: |
bundle exec pod trunk push arclight-event-tracker.podspec --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}