-
Notifications
You must be signed in to change notification settings - Fork 434
85 lines (79 loc) · 2.49 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
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:
DEVELOPER_DIR: /Applications/Xcode_16.0.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-15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Recover cached dependencies
uses: actions/cache@v4
id: dependency-cache
with:
path: ~/Library/Caches/org.carthage.CarthageKit
key: 4-carthage-verification-${{ runner.os }}-${{ hashFiles('Cartfile.resolved') }}
- name: Carthage verification
run: |
carthage checkout
carthage build --cache-builds --no-skip-current --use-xcframeworks
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-15
steps:
- name: Checkout
uses: actions/checkout@v4
- 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-15
steps:
- name: Checkout
uses: actions/checkout@v4
- 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-15
needs: [swiftpm-macos, cocoapods, carthage]
steps:
- name: git checkout
uses: actions/checkout@v4
- name: create release
uses: softprops/action-gh-release@v2
release-cocoapods:
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
name: CocoaPods Release
runs-on: macos-15
needs: [swiftpm-macos, cocoapods, carthage]
steps:
- name: git checkout
uses: actions/checkout@v4
- name: pod trunk push
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: pod trunk push