-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (48 loc) · 1.84 KB
/
publish_pod.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
name: Publish to CocoaPods
on:
workflow_call:
inputs:
version:
required: true
type: string
secrets:
trunk-token:
required: true
jobs:
publish:
runs-on: macOS-13
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.version }}
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_14.3.1.app
- name: Set release version
run: sed -i '' "s|[[:blank:]]*s\.version[[:blank:]].*|s.version = '${VERSION}'|g" *.podspec
env:
VERSION: ${{ inputs.version }}
- name: Set Core binary URL
run: |
FILE_URL=$(sed -n 's|let[[:blank:]]*binaryUrl[[:blank:]]*=[[:blank:]]*"\(.*\)"|\1|p' Package.swift)
SHA=$(sed -n 's|let[[:blank:]]*binaryChecksum[[:blank:]]*=[[:blank:]]*"\(.*\)"|\1|p' Package.swift)
POD_SOURCE="s.source = { :http => '${FILE_URL}', :sha256 => '${SHA}' }"
sed -i '' "s|[[:blank:]]*s\.source[[:blank:]].*|${POD_SOURCE}|g" Tesseract-Core.podspec
- name: Update CocoaPods repo
run: pod repo update
- name: Publish Core Pod
run: pod trunk push --allow-warnings --synchronous Tesseract-Core.podspec
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.trunk-token }}
- name: Publish Shared Pod
run: pod trunk push --allow-warnings --synchronous Tesseract-Shared.podspec
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.trunk-token }}
- name: Publish Client Pod
run: pod trunk push --allow-warnings --synchronous Tesseract-Client.podspec
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.trunk-token }}
- name: Publish Service Pod
run: pod trunk push --allow-warnings --synchronous Tesseract-Service.podspec
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.trunk-token }}