[video-v2.4.41]正式版 #184
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |