-
-
Notifications
You must be signed in to change notification settings - Fork 4
122 lines (112 loc) · 3.18 KB
/
main.yml
File metadata and controls
122 lines (112 loc) · 3.18 KB
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
name: CI/CD
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# schedule:
# - cron: '0 0 * * *'
workflow_dispatch:
inputs:
release:
description: Create release
required: false
type: boolean
version:
description: New version to release
required: false
type: string
concurrency:
group: ci/cd-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze
if: github.event_name != 'workflow_dispatch'
uses: SwiftyLab/ci/.github/workflows/analyze.yml@swift-codeql
permissions:
actions: read
contents: read
security-events: write
with:
matrix: >
{
"include": [
{
"os": "ubuntu-latest",
"language": "swift",
"swift": "5.7"
},
{
"os": "macos-latest",
"language": "swift"
}
]
}
# spell-check:
# name: Run spell check
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# - name: Spellcheck Action
# uses: rojopolis/spellcheck-github-actions@0.24.0
# with:
# config_path: .github/config/spellcheck.yml
# swift-package-test:
# name: Swift Package
# uses: SwiftyLab/ci/.github/workflows/swift-package.yml@swift-codeql
# secrets: inherit
# with:
# matrix: >
# {
# "include": [
# {
# "os": "ubuntu-latest",
# "swift": "5.7"
# },
# {
# "os": "ubuntu-20.04",
# "swift": "5.6"
# }
# ]
# }
# cocoapods-test:
# name: CocoaPods
# uses: SwiftyLab/ci/.github/workflows/cocoapods.yml@swift-codeql
# strategy:
# matrix:
# platforms: ['macos', 'ios', 'tvos']
# # platforms: ['macos tvos', 'ios', 'watchos']
# with:
# platforms: ${{ matrix.platforms }}
# xcode-test:
# name: Xcode
# uses: SwiftyLab/ci/.github/workflows/xcode.yml@swift-codeql
# with:
# os: macos-12
# xcode: '13.3.1'
# ci:
# name: CI
# if: github.event_name == 'push'
# needs: [analyze, swift-package-test, xcode-test, cocoapods-test]
# uses: SwiftyLab/ci/.github/workflows/ci.yml@swift-codeql
# cd:
# name: CD
# if: |
# (github.event_name == 'push' && needs.ci.outputs.release == 'true') ||
# (always() &&
# github.event_name == 'workflow_dispatch' &&
# github.event.inputs.release == 'true' &&
# needs.swift-package-test.result == 'success' &&
# needs.xcode-test.result == 'success' &&
# needs.cocoapods-test.result == 'success' &&
# (needs.ci.result == 'success' || needs.ci.result == 'skipped')) &&
# (needs.analyze.result == 'success' || needs.analyze.result == 'skipped')
# needs: [ci, analyze, swift-package-test, xcode-test, cocoapods-test]
# uses: SwiftyLab/ci/.github/workflows/cd.yml@swift-codeql
# with:
# os: macos-12
# version: ${{ github.event.inputs.version }}
# secrets:
# COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}