-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
119 lines (104 loc) · 3.46 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
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
name: CD
on:
workflow_dispatch:
inputs:
version:
required: true
jobs:
pods:
runs-on: macos-latest
steps:
- name: Start Deployment
uses: bobheadxi/deployments@v0.5.2
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: pods
- uses: actions/checkout@v3
with:
submodules: true
- run: pod trunk push --allow-warnings --skip-tests --skip-import-validation
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
- name: Seal Deployment
uses: bobheadxi/deployments@v0.5.2
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
# carthage:
# runs-on: macos-latest
# steps:
# - name: Start Deployment
# uses: bobheadxi/deployments@v0.5.2
# id: deployment
# with:
# step: start
# token: ${{ secrets.GITHUB_TOKEN }}
# env: carthage
# - uses: maxim-lobanov/setup-xcode@v1
# with:
# xcode-version: ^11
# # Waiting on https://github.com/Carthage/Carthage/issues/3103 for Xcode 12
# - uses: joutvhu/get-release@v1
# id: release
# with:
# tag_name: ${{ github.event.inputs.version }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - uses: actions/checkout@v2
# - run: carthage build --no-skip-current --platform macOS,iOS,watchOS,tvOS --archive
# - run: mv PromiseKit.framework.zip PromiseKit-$v.framework.zip
# - uses: actions/upload-release-asset@v1
# with:
# upload_url: ${{ steps.release.outputs.upload_url }}
# asset_path: ./PromiseKit-${{ github.event.inputs.version }}.framework.zip
# asset_name: PromiseKit-${{ github.event.inputs.version }}.framework.zip
# asset_content_type: application/zip
# env:
# GITHUB_TOKEN: ${{ github.token }}
# - name: Seal Deployment
# uses: bobheadxi/deployments@v0.5.2
# if: always()
# with:
# step: finish
# token: ${{ secrets.GITHUB_TOKEN }}
# status: ${{ job.status }}
# deployment_id: ${{ steps.deployment.outputs.deployment_id }}
docs:
runs-on: macos-latest
steps:
- name: Start Deployment
uses: bobheadxi/deployments@v0.5.2
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: docs
- uses: actions/checkout@v2
- run: gem install jazzy
- run: |
jazzy --config .github/jazzy.yml \
--github_url 'https://github.com/mxcl/PromiseKit' \
--module-version ${{ github.event.inputs.version }}
- run: git remote update
- run: git checkout gh-pages
- run: rm -rf reference/v6
- run: mv output reference/v6
- run: git add reference/v6
- run: git config user.name github-actions
- run: git config user.email github-actions@github.com
- run: git commit -m 'Updated docs for v${{ github.event.inputs.version }}'
- run: git remote add secure-origin https://${{ secrets.JAZZY_PAT }}@github.com/mxcl/PromiseKit.git
- run: git push secure-origin gh-pages
- name: Seal Deployment
uses: bobheadxi/deployments@v0.5.2
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}