@@ -12,15 +12,139 @@ jobs:
1212 - name : Checkout
1313 uses : actions/checkout@v2
1414
15- - name : Deploy to CocoapodsPre
15+ - name : Get Pod Version
16+ run : |
17+ rtt=$(git describe --tags `git rev-list --tags --max-count=1`)
18+ echo "curr_tag=$rtt" >> $GITHUB_ENV
19+
20+ # faac-v2.2.2
21+ # ijkplayer-v2.2.2
22+ # tpns-v2.2.2
23+ # wechat-v2.2.2
24+ # xp2p-v2.2.2
25+ # xp2p-v2.2.2-beta.1
26+
27+ - name : Deploy Faac SDK
28+ if : ${{contains(env.curr_tag, 'faac')}}
1629 run : |
1730 set -eo pipefail
1831
19- VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
20- echo $VERSION
21- export LIB_VERSION=$VERSION
32+ temptag=$(git describe --tags `git rev-list --tags --max-count=1`)
33+ vtaglist=(${temptag//-/ })
34+ beta=${vtaglist[2]}
35+ version=${vtaglist[1]}
36+ if [ ${#beta} -gt 0 ]
37+ then
38+ version=${vtaglist[1]}-$beta
39+ fi
40+ version=${version#*v}
41+ echo $version
42+
43+ export LIB_VERSION=$version
44+ perl -i -pe "s#.*s.source .*#\ts.source = { :git => 'https://github.com/tencentyun/iot-thirdparty-ios.git', :tag => \"$temptag\" }#g" TIoTLinkKit_Faac.podspec
45+
46+ pod lib lint TIoTLinkKit_Faac.podspec --verbose --allow-warnings --use-libraries
47+ pod trunk push TIoTLinkKit_Faac.podspec --verbose --allow-warnings --use-libraries
48+ env :
49+ COCOAPODS_TRUNK_TOKEN : ${{ secrets.IOT_COCOAPODS_TRUNK_TOKEN }}
50+
51+
52+
53+ - name : Deploy Video SDK
54+ if : ${{contains(env.curr_tag, 'ijkplayer')}}
55+ run : |
56+ set -eo pipefail
57+
58+ temptag=$(git describe --tags `git rev-list --tags --max-count=1`)
59+ vtaglist=(${temptag//-/ })
60+ beta=${vtaglist[2]}
61+ version=${vtaglist[1]}
62+ if [ ${#beta} -gt 0 ]
63+ then
64+ version=${vtaglist[1]}-$beta
65+ fi
66+ version=${version#*v}
67+ echo $version
68+
69+ export LIB_VERSION=$version
70+ perl -i -pe "s#.*s.source .*#\ts.source = { :git => 'https://github.com/tencentyun/iot-thirdparty-ios.git', :tag => => \"$temptag\" }#g" TIoTLinkKit_IJKPlayer.podspec
71+
72+ pod lib lint TIoTLinkKit_IJKPlayer.podspec --verbose --allow-warnings --use-libraries
73+ pod trunk push TIoTLinkKit_IJKPlayer.podspec --verbose --allow-warnings --use-libraries
74+ env :
75+ COCOAPODS_TRUNK_TOKEN : ${{ secrets.IOT_COCOAPODS_TRUNK_TOKEN }}
76+
77+
78+ - name : Deploy Video SDK
79+ if : ${{contains(env.curr_tag, 'tpns')}}
80+ run : |
81+ set -eo pipefail
82+
83+ temptag=$(git describe --tags `git rev-list --tags --max-count=1`)
84+ vtaglist=(${temptag//-/ })
85+ beta=${vtaglist[2]}
86+ version=${vtaglist[1]}
87+ if [ ${#beta} -gt 0 ]
88+ then
89+ version=${vtaglist[1]}-$beta
90+ fi
91+ version=${version#*v}
92+ echo $version
93+
94+ export LIB_VERSION=$version
95+ perl -i -pe "s#.*s.source .*#\ts.source = { :git => 'https://github.com/tencentyun/iot-thirdparty-ios.git', :tag => \"$temptag\" }#g" TIoTLinkKit_TPNS.podspec
96+
97+ pod lib lint TIoTLinkKit_TPNS.podspec --verbose --allow-warnings --use-libraries
98+ pod trunk push TIoTLinkKit_TPNS.podspec --verbose --allow-warnings --use-libraries
99+ env :
100+ COCOAPODS_TRUNK_TOKEN : ${{ secrets.IOT_COCOAPODS_TRUNK_TOKEN }}
101+
102+
103+ - name : Deploy Video SDK
104+ if : ${{contains(env.curr_tag, 'wechat')}}
105+ run : |
106+ set -eo pipefail
107+
108+ temptag=$(git describe --tags `git rev-list --tags --max-count=1`)
109+ vtaglist=(${temptag//-/ })
110+ beta=${vtaglist[2]}
111+ version=${vtaglist[1]}
112+ if [ ${#beta} -gt 0 ]
113+ then
114+ version=${vtaglist[1]}-$beta
115+ fi
116+ version=${version#*v}
117+ echo $version
118+
119+ export LIB_VERSION=$version
120+ perl -i -pe "s#.*s.source .*#\ts.source = { :git => 'https://github.com/tencentyun/iot-thirdparty-ios.git', :tag => \"$temptag\" }#g" TIoTLinkKit_WechatOpenSDK.podspec
121+
122+ pod lib lint TIoTLinkKit_WechatOpenSDK.podspec --verbose --allow-warnings --use-libraries
123+ pod trunk push TIoTLinkKit_WechatOpenSDK.podspec --verbose --allow-warnings --use-libraries
124+ env :
125+ COCOAPODS_TRUNK_TOKEN : ${{ secrets.IOT_COCOAPODS_TRUNK_TOKEN }}
126+
127+
128+ - name : Deploy Video SDK
129+ if : ${{contains(env.curr_tag, 'xp2p')}}
130+ run : |
131+ set -eo pipefail
132+
133+ temptag=$(git describe --tags `git rev-list --tags --max-count=1`)
134+ vtaglist=(${temptag//-/ })
135+ beta=${vtaglist[2]}
136+ version=${vtaglist[1]}
137+ if [ ${#beta} -gt 0 ]
138+ then
139+ version=${vtaglist[1]}-$beta
140+ fi
141+ version=${version#*v}
142+ echo $version
143+
144+ export LIB_VERSION=$version
145+ perl -i -pe "s#.*s.source .*#\ts.source = { :git => 'https://github.com/tencentyun/iot-thirdparty-ios.git', :tag => \"$temptag\" }#g" TIoTLinkKit_XP2P.podspec
22146
23- pod lib lint --verbose --allow-warnings --use-libraries
24- pod trunk push --verbose --allow-warnings --use-libraries
147+ pod lib lint TIoTLinkKit_XP2P.podspec --verbose --allow-warnings --use-libraries
148+ pod trunk push TIoTLinkKit_XP2P.podspec --verbose --allow-warnings --use-libraries
25149 env :
26150 COCOAPODS_TRUNK_TOKEN : ${{ secrets.IOT_COCOAPODS_TRUNK_TOKEN }}
0 commit comments