-
Notifications
You must be signed in to change notification settings - Fork 16
91 lines (87 loc) · 2.75 KB
/
publish.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: SDK publish
on:
push:
branches:
- 'master'
- 'support/*'
- 'feature/MBX-3346-MindboxLoggerCI'
tags-ignore:
- '**'
jobs:
# unit:
# runs-on: macos-14
# steps:
# - uses: actions/checkout@v4
# - name: Update bundler
# run: gem install bundler
# - name: Install bundler dependencies
# run: bundle install
# - name: Run unit tests
# run: bundle exec fastlane unitTestLane
logger-publish:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Update bundler
run: gem install bundler
- name: Install bundler dependencies
run: bundle install
- name: Deploy to Cocoapods MindboxLogger
run: |
set -eo pipefail
pod lib lint MindboxLogger.podspec --allow-warnings
output=$(pod trunk push MindboxLogger.podspec --allow-warnings 2>&1)
echo "$output"
if echo "$output" | grep -q "Unable to accept duplicate entry for: MindboxLogger"; then
echo "Обнаружен дубликат версии, пропускаем публикацию."
exit 0
else
echo "Ошибка при публикации, требуется вмешательство."
echo "$output"
exit 1
fi
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TOKEN }}
- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'C06RXV161RA'
payload: |
{
"text": "iOS - release",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "🚀 MindboxLogger has been successfuly released."
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_MOBILE_NOTIFIER_TOKEN }}
publish:
needs: [logger-publish]
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Release generation
run: ./git-release.sh "${{ github.event.head_commit.message }}" "${{secrets.GITHUBACCESSTOKEN}}" "${{secrets.GITHUBUSER}}"
- name: Update bundler
run: gem install bundler
- name: Install bundler dependencies
run: bundle install
- name: Select Xcode
run: sudo xcode-select --switch /Applications/Xcode_14.3.1.app
- name: Run build
run: bundle exec fastlane buildLane
env:
CI: true
- name: Deploy to Cocoapods Mindbox/MindboxNotifications
run: |
set -eo pipefail
pod lib lint --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TOKEN }}