-
Notifications
You must be signed in to change notification settings - Fork 16
60 lines (48 loc) · 1.83 KB
/
deploypod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: iOS pod CI
on:
release:
types: [published]
branches:
- master
jobs:
build-and-deploy:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get Pod Version
run: |
rtt=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "curr_tag=$rtt" >> $GITHUB_ENV
- name: Deploy Link SDK
if: ${{!contains(env.curr_tag, 'video')}}
run: |
set -eo pipefail
temptag=$(git describe --tags `git rev-list --tags --max-count=1`)
VERSION=${temptag#*v}
echo $VERSION
export LIB_VERSION=$VERSION
pod lib lint TIoTLinkKit.podspec --verbose --allow-warnings --use-libraries
pod trunk push TIoTLinkKit.podspec --verbose --allow-warnings --use-libraries
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.IOT_COCOAPODS_TRUNK_TOKEN }}
- name: Deploy Video SDK
if: ${{contains(env.curr_tag, 'video')}}
run: |
set -eo pipefail
temptag=$(git describe --tags `git rev-list --tags --max-count=1`)
vtaglist=(${temptag//-/ })
beta=${vtaglist[2]}
version=${vtaglist[1]}
if [ ${#beta} -gt 0 ]
then
version=${vtaglist[1]}-$beta
fi
version=${version#*v}
echo $version
export LIB_VERSION=$version
perl -i -pe "s#.*s.source =.*#\ts.source = { :git => 'https://github.com/tencentyun/iot-link-ios.git', :tag => \"$temptag\" }#g" TIoTLinkVideo.podspec
pod lib lint TIoTLinkVideo.podspec --verbose --allow-warnings --use-libraries
pod trunk push TIoTLinkVideo.podspec --verbose --allow-warnings --use-libraries
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.IOT_COCOAPODS_TRUNK_TOKEN }}