-
Notifications
You must be signed in to change notification settings - Fork 2
87 lines (72 loc) · 3.32 KB
/
cd.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
name: CD
on:
push:
branches:
- master
jobs:
build:
runs-on: macos-13
steps:
- name: Checkout the code
uses: actions/checkout@v2
with:
# Check out as an admin to allow for pushing back to master
token: ${{ secrets.GH_TOKEN }}
# We need to fetch all tags and branches
fetch-depth: 0
- name: Select xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0.1'
- name: Set git identity
run: |
git config --global user.name "Blu Release Bot"
git config --global user.email "devs@useblu.com.br"
- name: Bundle install
run: bundle install
- name: Install mint
run: brew install mint
- name: Install swiftgen
run: mint install SwiftGen/SwiftGen
- name: Update tokens
run: sh update_tokens.sh
- name: Increment version cocoapod
run: |
LATEST_VERSION_TOKENS_LIB_NPM=`npm show @useblu/ocean-tokens version`
# rm OceanTokens.podspec
rm OceanComponents.podspec
# cp -fR OceanTokens.template OceanTokens.podspec
cp -fR OceanComponents.template OceanComponents.podspec
# sed -i '' "s/#VERSION_NAME#/'$LATEST_VERSION_TOKENS_LIB_NPM-$GITHUB_RUN_NUMBER'/g" OceanTokens.podspec
sed -i '' "s/#VERSION_NAME#/'$LATEST_VERSION_TOKENS_LIB_NPM-$GITHUB_RUN_NUMBER'/g" OceanComponents.podspec
- name: Commit changes
run: |
LATEST_VERSION_TOKENS_LIB_NPM=`npm show @useblu/ocean-tokens version`
git add . && git commit -am "chore: update tokens v$LATEST_VERSION_TOKENS_LIB_NPM [skip ci]" && git push
# git tag -a "OceanTokens-$LATEST_VERSION_TOKENS_LIB_NPM-$GITHUB_RUN_NUMBER" -m "Release of version OceanTokens $LATEST_VERSION_TOKENS_LIB_NPM-$GITHUB_RUN_NUMBER" && git push --tags
git tag -a "OceanComponents-$LATEST_VERSION_TOKENS_LIB_NPM-$GITHUB_RUN_NUMBER" -m "Release of version OceanComponents $LATEST_VERSION_TOKENS_LIB_NPM-$GITHUB_RUN_NUMBER" && git push --tags
- name: Fix cocoapod Xcode 15
run: |
cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/
sudo git clone https://github.com/kamyarelyasi/Libarclite-Files.git
sudo mv Libarclite-Files arc
- name: Deploy libary cocoapod
run: |
# pod trunk push OceanTokens.podspec
pod trunk push OceanComponents.podspec
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
- name: Install pods
run: pod install
- name: Increment version app sample
run: bundle exec fastlane prepare_new_version
- name: Deploy app sample
run: bundle exec fastlane beta_testflight
env:
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}