Skip to content

Commit 24b7b5c

Browse files
authored
Update ci-cd.yml
1 parent 23329e1 commit 24b7b5c

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/ci-cd.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@ on:
44
push:
55
branches:
66
- dev
7-
pull_request:
8-
branches:
9-
- dev
107

118
jobs:
12-
build:
13-
name: Build and Test
9+
build_and_publish:
10+
name: Build, Test, and Publish
1411
runs-on: macos-latest
1512

1613
steps:
@@ -39,3 +36,18 @@ jobs:
3936
uses: codecov/codecov-action@v2
4037
with:
4138
token: ${{ secrets.CODECOV_TOKEN }}
39+
40+
- name: Update Podspec Version
41+
run: |
42+
# Update the version in your podspec
43+
sed -i '' "s/s.version *= *'[^']*'/s.version = '$(git describe --tags --abbrev=0 | sed 's/v//')'/g" FlutterwaveSDK.podspec
44+
45+
- name: Publish to CocoaPods
46+
run: |
47+
# Authenticate with CocoaPods repo using environment variables
48+
echo -e "$POD_REPO_SECRET" | pod trunk register $POD_REPO '[email protected]' --name='Your Name' --silent
49+
pod trunk push FlutterwaveSDK.podspec --allow-warnings
50+
51+
env:
52+
POD_REPO: 'https://github.com/CocoaPods/Specs.git'
53+
POD_REPO_SECRET: ${{ secrets.COCOAPODS_REPO_SECRET }}

0 commit comments

Comments
 (0)