Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
7e2bdba
Add iOS release automation workflow
arkaza-nr Dec 8, 2025
131b077
chore: semantic-release setup
arkaza-nr Dec 15, 2025
9eab955
feat: add automated release workflow
arkaza-nr Dec 15, 2025
46eacd1
feat: add automated release workflow
arkaza-nr Dec 15, 2025
ff3cdd6
feat: add automated release workflow
arkaza-nr Dec 15, 2025
77845b8
feat: add automated release workflow
arkaza-nr Dec 15, 2025
3809333
fix: add conventional-changelog-conventionalcommits dependency
arkaza-nr Dec 15, 2025
82cb673
fix: correct YAML syntax for PR body and commit message
arkaza-nr Dec 15, 2025
968678d
chore(release): 4.1.0 [skip ci]
semantic-release-bot Dec 15, 2025
fb8fb14
fix: correct YAML syntax for PR body and commit message
arkaza-nr Dec 16, 2025
c1f07ec
chore: allow test branch for semantic-release testing
arkaza-nr Dec 16, 2025
ef6dce5
chore: release branch should only have mandatory files
arkaza-nr Dec 16, 2025
25a0d2d
chore: can have changed files in test branch
arkaza-nr Dec 16, 2025
2b846de
feat: automate iOS release process with semantic versioning
arkaza-nr Dec 16, 2025
8aa76d2
chore: code clean up
arkaza-nr Dec 16, 2025
7f711db
feat: implement stable one-shot PR release workflow
arkaza-nr Dec 16, 2025
903711c
feat: test stable one-shot PR workflow
arkaza-nr Dec 16, 2025
56e88c0
fix: remove unnecessary manual tag creation step
arkaza-nr Dec 16, 2025
4dc66b7
feat: test release workflow
arkaza-nr Dec 16, 2025
01993c1
feat: test release workflow after tag cleanup
arkaza-nr Dec 16, 2025
f89705c
feat: trigger release workflow
arkaza-nr Dec 17, 2025
639eada
chore: fix chnagelog
arkaza-nr Dec 17, 2025
7d5092c
chore(release): update podspec versions to 4.1.0
github-actions[bot] Dec 17, 2025
021c894
feat: tetsing publish workflow
arkaza-nr Dec 17, 2025
5c1d12c
Merge pull request #83 from newrelic/release/4.1.0
arkaza-nr Dec 17, 2025
8cfb755
fix: add label to release PR
arkaza-nr Dec 17, 2025
eb97b87
Merge branch 'user/arkazakumari/ios-release-automation' of github.com…
arkaza-nr Dec 17, 2025
03c6932
fix: add label to release PR
arkaza-nr Dec 17, 2025
d3698d7
chore(release): update podspec versions to 4.1.0
github-actions[bot] Dec 17, 2025
4952ec2
Merge pull request #84 from newrelic/release/4.1.0
arkaza-nr Dec 17, 2025
ffc3d2f
chore: testing workflows
arkaza-nr Dec 17, 2025
40f4b15
Merge branch 'user/arkazakumari/ios-release-automation' of github.com…
arkaza-nr Dec 17, 2025
b65c39c
chore: testing workflows
arkaza-nr Dec 17, 2025
bd8e4b7
chore(release): update podspec versions to 4.1.0
github-actions[bot] Dec 17, 2025
a0d5cd1
Merge pull request #85 from newrelic/release/4.1.0
arkaza-nr Dec 17, 2025
fdd4c20
chore: testing workflows
arkaza-nr Dec 17, 2025
1934455
chore: remove debugging code
arkaza-nr Dec 17, 2025
9747a25
chore: addressed comments
arkaza-nr Dec 18, 2025
2486db0
fix: tag creation should happen during release creation
arkaza-nr Dec 18, 2025
ad9679d
fix: semantic tag creation
arkaza-nr Dec 18, 2025
9769857
fix: remove tag craetion through semantic release
arkaza-nr Dec 18, 2025
29ee1ae
fix: tag creation with semantic
arkaza-nr Dec 23, 2025
4de8065
fix: changelog not generated in dry run mode
arkaza-nr Dec 23, 2025
fb73e36
chore(release): update podspec versions to 4.1.0
github-actions[bot] Dec 23, 2025
d1720f6
chore(release): 4.1.0 [skip ci]
semantic-release-bot Dec 23, 2025
6f6de8b
fix: version was getting updated in local branch
arkaza-nr Dec 23, 2025
9f30241
fix: version was getting updated in local branch
arkaza-nr Dec 23, 2025
4e8b121
fix: use conventional-changelog for tag creation
arkaza-nr Dec 23, 2025
815f28f
fix: use conventional-changelog for tag creation
arkaza-nr Dec 23, 2025
75bf6bc
fix: add conventional-changelog-angular dependency
arkaza-nr Dec 23, 2025
9238f19
fix: add conventional-changelog dependency
arkaza-nr Dec 23, 2025
7a2b6d0
fix: version is incorrect in chnagelog
arkaza-nr Dec 24, 2025
015c019
fix: extract changelog in release notes, remove debugging code
arkaza-nr Dec 24, 2025
88d3343
chore: add assets to release note
arkaza-nr Dec 29, 2025
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
238 changes: 238 additions & 0 deletions .github/workflows/ios-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
name: Publish to CocoaPods

on:
pull_request:
types: [closed]
branches:
- master
workflow_dispatch:
inputs:
version:
description: 'Version to publish (optional, will auto-detect from podspec)'
required: false

permissions:
contents: write

jobs:
publish:
runs-on: macos-latest
# Only run if PR was merged and has release label
if: |
(github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')) ||
github.event_name == 'workflow_dispatch'

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: false

- name: Install CocoaPods
run: |
gem install cocoapods
pod --version

- name: Extract version from podspec
id: get_version
run: |
if [ -n "${{ github.event.inputs.version }}" ]; then
VERSION="${{ github.event.inputs.version }}"
echo "Using manual version: $VERSION"
else
VERSION=$(grep "s.version" NewRelicVideoAgent.podspec | sed -E "s/.*s\.version[[:space:]]*=[[:space:]]*'([0-9]+\.[0-9]+\.[0-9]+)'.*/\1/")
echo "Extracted version from podspec: $VERSION"
fi

if [ -z "$VERSION" ]; then
echo "Failed to extract version"
exit 1
fi

echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Publishing version: $VERSION"

- name: Validate podspecs
run: |
echo "Validating podspecs..."

pod lib lint NewRelicVideoAgent.podspec --allow-warnings
echo "NewRelicVideoAgent.podspec validated"

pod lib lint NRAVPlayerTracker.podspec --allow-warnings
echo "NRAVPlayerTracker.podspec validated"

pod lib lint NRIMATracker.podspec --allow-warnings
echo "NRIMATracker.podspec validated"

echo ""
echo "All podspecs validated successfully!"

- name: Setup CocoaPods trunk authentication
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
if [ -z "$COCOAPODS_TRUNK_TOKEN" ]; then
echo "Error: COCOAPODS_TRUNK_TOKEN secret is not set"
echo "Please add your CocoaPods trunk token to GitHub repository secrets"
exit 1
fi

cat > ~/.netrc <<EOF
machine trunk.cocoapods.org
login token
password ${COCOAPODS_TRUNK_TOKEN}
EOF
chmod 600 ~/.netrc

echo "CocoaPods trunk authentication configured"

- name: Publish NewRelicVideoAgent
run: |
echo "Publishing NewRelicVideoAgent..."
pod trunk push NewRelicVideoAgent.podspec --allow-warnings
echo "NewRelicVideoAgent published!"

- name: Wait for NewRelicVideoAgent indexing
run: |
echo "Waiting for NewRelicVideoAgent to be indexed by CocoaPods..."
echo "This usually takes ~5 minutes..."

VERSION="${{ steps.get_version.outputs.version }}"
MAX_ATTEMPTS=20
ATTEMPT=0
WAIT_TIME=30

while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do
ATTEMPT=$((ATTEMPT + 1))
echo "Attempt $ATTEMPT/$MAX_ATTEMPTS: Checking if NewRelicVideoAgent $VERSION is indexed..."

if pod search NewRelicVideoAgent | grep -q "$VERSION"; then
echo "NewRelicVideoAgent $VERSION is now indexed!"
exit 0
fi

if [ $ATTEMPT -lt $MAX_ATTEMPTS ]; then
echo "Not indexed yet, waiting ${WAIT_TIME} seconds..."
sleep $WAIT_TIME
fi
done

echo "Timeout waiting for indexing, proceeding anyway..."

- name: Publish NRAVPlayerTracker
run: |
echo "Publishing NRAVPlayerTracker..."
pod trunk push NRAVPlayerTracker.podspec --allow-warnings
echo "NRAVPlayerTracker published!"

- name: Publish NRIMATracker
run: |
echo "Publishing NRIMATracker..."
pod trunk push NRIMATracker.podspec --allow-warnings
echo "NRIMATracker published!"

- name: Extract changelog excerpt
id: changelog
run: |
VERSION="${{ steps.get_version.outputs.version }}"
VERSION_REGEX=$(echo "$VERSION" | sed 's/\./\\./g')
start=$(grep -n "^## \[$VERSION_REGEX\]" CHANGELOG.md | cut -d: -f1)
end=$(awk "NR > $start && /^## \\[/" CHANGELOG.md | head -1 | awk '{print NR+$start}')
if [ -z "$start" ]; then
CHANGELOG="See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/master/CHANGELOG.md) for details."
else
if [ -z "$end" ]; then
tail -n +"$((start+1))" CHANGELOG.md > excerpt.txt
else
sed -n "$((start+1)),$((end-1))p" CHANGELOG.md > excerpt.txt
fi
CHANGELOG=$(cat excerpt.txt)
fi
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Build XCFrameworks
run: |
chmod +x ./build-xcframeworks.sh
./build-xcframeworks.sh

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.get_version.outputs.version }}
name: Release v${{ steps.get_version.outputs.version }}
body: |
## Release v${{ steps.get_version.outputs.version }}

Published to CocoaPods:
- NewRelicVideoAgent `${{ steps.get_version.outputs.version }}`
- NRAVPlayerTracker `${{ steps.get_version.outputs.version }}`
- NRIMATracker `${{ steps.get_version.outputs.version }}`

### Installation

Add to your `Podfile`:

```ruby
pod 'NewRelicVideoAgent', '~> ${{ steps.get_version.outputs.version }}'
pod 'NRAVPlayerTracker', '~> ${{ steps.get_version.outputs.version }}'
pod 'NRIMATracker', '~> ${{ steps.get_version.outputs.version }}'
```

Then run:

```bash
pod install
```

### What's Changed

${{ steps.changelog.outputs.changelog }}

### Assets

[xcframeworks.zip](./xcframeworks.zip)
files: xcframeworks.zip
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Verify publication
run: |
echo "Verifying publication..."
VERSION="${{ steps.get_version.outputs.version }}"

echo ""
echo "=== NewRelicVideoAgent ==="
pod search NewRelicVideoAgent | head -15

echo ""
echo "=== NRAVPlayerTracker ==="
pod search NRAVPlayerTracker | head -15

echo ""
echo "=== NRIMATracker ==="
pod search NRIMATracker | head -15

echo ""
echo "=================================="
echo "Release Complete!"
echo "=================================="
echo ""
echo "All pods published successfully for version $VERSION"
echo ""
echo "Users can now install with:"
echo " pod 'NewRelicVideoAgent', '~> $VERSION'"
echo " pod 'NRAVPlayerTracker', '~> $VERSION'"
echo " pod 'NRIMATracker', '~> $VERSION'"
echo ""
Loading
Loading