-
Notifications
You must be signed in to change notification settings - Fork 36
151 lines (126 loc) · 4.23 KB
/
release.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: release
on:
release:
types: [ published ]
defaults:
run:
shell: bash -l {0}
jobs:
Build:
name: Build
permissions:
statuses: write
pull-requests: write
uses: ./.github/workflows/_build.yml
secrets:
GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }}
Deploy-Common:
name: Release Common to Cocoapods
runs-on: macos-15
environment: Publishing
needs: [Build]
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
ref: main
- name: Set up node and ruby
uses: asdf-vm/actions/install@v3 # Sets ruby and node version via `.tool-versions`
- name: Bundle Install
run: bundle install --jobs 4 --retry 3
- name: Select Xcode 16
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Publish Pods - Backpack Common
run: |
set -eo pipefail
bundle exec pod trunk push Backpack-Common.podspec --allow-warnings --skip-tests --synchronous
bundle exec pod repo update
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
LIB_VERSION: ${{ github.event.release.tag_name }}
Deploy-UIKit:
name: Release UIKit to Cocoapods
runs-on: macos-15
environment: Publishing
needs: [Build]
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
ref: main
- name: Set up node and ruby
uses: asdf-vm/actions/install@v3 # Sets ruby and node version via `.tool-versions`
- name: Bundle Install
run: bundle install --jobs 4 --retry 3
- name: Select Xcode 16
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Publish Pods - Backpack UIKit
run: |
set -eo pipefail
bundle exec pod trunk push Backpack.podspec --allow-warnings --skip-tests --synchronous
bundle exec pod repo update
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
LIB_VERSION: ${{ github.event.release.tag_name }}
Deploy-SwiftUI:
name: Release SwiftUI to Cocoapods
runs-on: macos-15
environment: Publishing
needs: [Build]
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
ref: main
- name: Set up node and ruby
uses: asdf-vm/actions/install@v3 # Sets ruby and node version via `.tool-versions`
- name: Bundle Install
run: bundle install --jobs 4 --retry 3
- name: Select Xcode 16
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Publish Pods - Backpack SwiftUI
run: |
set -eo pipefail
bundle exec pod trunk push Backpack-SwiftUI.podspec --allow-warnings --skip-tests --synchronous
bundle exec pod repo update
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
LIB_VERSION: ${{ github.event.release.tag_name }}
Deploy-Docs:
name: Release Backpack Docs
runs-on: macos-15
environment: Publishing
needs: [Deploy-SwiftUI, Deploy-UIKit, Deploy-Common]
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
ref: main
- name: Set up node and ruby
uses: asdf-vm/actions/install@v3 # Sets ruby and node version via `.tool-versions``
- name: Bundle Install
run: bundle install --jobs 4 --retry 3
- name: Pod Install
run: bundle exec pod install
working-directory: Example
- name: Install sourcekitten
run: brew install sourcekitten
- name: Build and verify docs (release)
if: github.event.release.tag_name != ''
run: ./scripts/build-docs $RELEASE_VERSION
env:
RELEASE_VERSION: ${{ github.event.release.tag_name }}
- name: Deploy code documentation
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.DEPLOY_TOKEN }}
publish_dir: docs/
keep_files: true
external_repository: backpack/ios
publish_branch: main
SupernovaPublish:
runs-on: ubuntu-22.04
environment: Publishing
steps:
- name: Update Supernova docs
run: npx @supernovaio/cli publish-documentation --apiKey=${{ secrets.SUPERNOVA_API_KEY }} --designSystemId=${{ secrets.SUPERNOVA_DESIGN_SYSTEM_ID }}