forked from hCaptcha/HCaptcha-ios-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (76 loc) · 2.14 KB
/
workflow.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
name: Build
on:
push:
branches: [ master, main ]
tags: [ '[1-9]+.[0-9]+.[0-9]+*' ]
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
repository_dispatch:
jobs:
sdk:
name: Test SDK
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Use Xcode 12.4
run: sudo xcode-select -switch /Applications/Xcode_12.4.app
- name: "Cache dependencies"
uses: actions/cache@v2
with:
path: Carthage/build
key: ${{ runner.os }}-carthage-v2-${{ hashFiles('**/Cartfile.resolved') }}
restore-keys: |
${{ runner.os }}-carthage-v2
- run: brew upgrade carthage
- uses: ruby/[email protected]
with:
ruby-version: 2.7.2
bundler-cache: true
- run: bundle exec fastlane ci
samples:
name: Build Samples
needs: sdk
runs-on: macos-11
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
xcode: [ '12.4' ]
experimental: [ false ]
include:
- xcode: '13.2.1'
experimental: true
steps:
- uses: actions/checkout@v2
- name: Use Xcode ${{ matrix.xcode }}
run: sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode }}.app
- uses: ruby/[email protected]
with:
ruby-version: 2.7.2
bundler-cache: true
- run: bundle exec pod install
working-directory: Example
- run: bundle exec fastlane ios samples_build
release:
name: Relase
if: startsWith(github.ref, 'refs/tags')
needs: samples
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/[email protected]
with:
ruby-version: 2.7.2
bundler-cache: true
- name: Release
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name github-actions
git config user.email [email protected]
bundle exec fastlane release