Skip to content

Commit

Permalink
fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Beas authored and Victor Beas committed Dec 27, 2024
1 parent d8535cd commit dc5a206
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Install Cocoapods
run: pod install --project-directory=Example

- name: Create and Push Tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -eo pipefail
VERSION=$(grep -oE "s.version.*= *'[^']*'" KhipuClientIOS.podspec | grep -oE "'[^']*'" | tr -d "'")
echo "Detected version: $VERSION"
git tag $VERSION
git push origin $VERSION
- name: Deploy to Cocoapods
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
if [ -z "$COCOAPODS_TRUNK_TOKEN" ]; then
echo "Error: COCOAPODS_TRUNK_TOKEN is empty"
else
echo "COCOAPODS_TRUNK_TOKEN is set, proceeding with deployment..."
fi
set -eo pipefail
pod trunk me
pod lib lint --allow-warnings
pod trunk push --allow-warnings
pod trunk push --allow-warnings
3 changes: 3 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Select Xcode Version
run: sudo xcode-select -s /Applications/Xcode_16.0.app

- name: Build
env:
scheme: 'KhipuClientIOS-Example'
Expand All @@ -26,6 +28,7 @@ jobs:
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device"
- name: Test
env:
scheme: 'KhipuClientIOS-Example'
Expand Down

0 comments on commit dc5a206

Please sign in to comment.