Skip to content

Commit ff3cdd6

Browse files
committed
feat: add automated release workflow
1 parent 46eacd1 commit ff3cdd6

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/ios-release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,20 @@ jobs:
4141
id: current_version
4242
run: |
4343
# Extract current version from NewRelicVideoAgent.podspec
44-
CURRENT_VERSION=$(grep "s.version" NewRelicVideoAgent.podspec | sed -E "s/.*s\.version[[:space:]]*=[[:space:]]*'([0-9]+\.[0-9]+\.[0-9]+)'.*/\1/")
45-
44+
# Match only the line with s.version assignment, not s.source
45+
CURRENT_VERSION=$(grep -E "^\s*s\.version\s*=" NewRelicVideoAgent.podspec | sed -E "s/.*'([0-9]+\.[0-9]+\.[0-9]+)'.*/\1/")
46+
4647
if [ -z "$CURRENT_VERSION" ]; then
4748
echo "Failed to extract current version from podspec"
4849
exit 1
4950
fi
50-
51+
5152
# Validate semantic version format
5253
if ! [[ "$CURRENT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
5354
echo "Invalid version format: $CURRENT_VERSION"
5455
exit 1
5556
fi
56-
57+
5758
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
5859
echo "Current version from podspec: $CURRENT_VERSION"
5960

0 commit comments

Comments
 (0)