-
Notifications
You must be signed in to change notification settings - Fork 434
88 lines (82 loc) · 2.68 KB
/
master.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
on:
push:
branches:
- master
tags:
- '[0-9]+\.[0-9]+\.[0-9]+'
- '[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+'
pull_request:
types: [labeled]
branches:
- master
env:
# Keep using Xcode 13 until CP releases the fix for watchOS verification on Xcode 14
# https://github.com/CocoaPods/CocoaPods/issues/11558
# https://github.com/CocoaPods/CocoaPods/pull/11660
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
name: Verification | Release
jobs:
carthage:
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.label.name == 'ci:verify' ) }}
name: Carthage Verification
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Recover cached dependencies
uses: actions/cache@v1
id: dependency-cache
with:
path: ~/Library/Caches/org.carthage.CarthageKit
key: 4-carthage-verification-${{ runner.os }}-${{ hashFiles('Cartfile.resolved') }}
- name: Carthage verification
run: |
./script/carthage checkout
./script/carthage build --cache-builds --no-skip-current
swiftpm-macos:
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.label.name == 'ci:verify' ) }}
name: SwiftPM macOS Verification
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Pull dependencies
run: |
swift package resolve
- name: Test via SwiftPM
run: |
swift --version
swift build
cocoapods:
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.label.name == 'ci:verify' ) }}
name: CocoaPods Verification
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v2
- name: CocoaPods verification
run: |
pod repo update
pod lib lint --use-libraries
release-github:
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
name: GitHub Release
runs-on: macos-12
needs: [swiftpm-macos, cocoapods, carthage]
steps:
- name: git checkout
uses: actions/checkout@v2
- name: create release
uses: softprops/action-gh-release@v1
release-cocoapods:
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
name: CocoaPods Release
runs-on: macos-12
needs: [swiftpm-macos, cocoapods, carthage]
steps:
- name: git checkout
uses: actions/checkout@v2
- name: pod trunk push
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: pod trunk push