-
Notifications
You must be signed in to change notification settings - Fork 199
68 lines (64 loc) · 1.79 KB
/
build_amplify_swift_platforms.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
name: Build | Amplify Swift
on:
workflow_call:
inputs:
identifier:
required: true
type: string
workflow_dispatch:
inputs:
ios:
description: '📱 iOS'
required: true
default: true
type: boolean
macos:
description: '💻 macOS'
required: true
default: true
type: boolean
tvos:
description: '📺 tvOS'
required: true
default: true
type: boolean
watchos:
description: '⌚️ watchOS'
required: true
default: true
type: boolean
push:
branches-ignore:
- main
- release
permissions:
contents: read
actions: write
concurrency:
group: ${{ inputs.identifier || github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main'}}
jobs:
build-amplify-swift:
name: Build Amplify Swift for ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [iOS, macOS, tvOS, watchOS]
exclude:
- platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
- platform: ${{ github.event.inputs.macos == 'false' && 'macOS' || 'None' }}
- platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
- platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/build_scheme.yml
with:
scheme: Amplify-Package
platform: ${{ matrix.platform }}
confirm-pass:
runs-on: ubuntu-latest
name: Confirm Passing Build Steps
if: ${{ !cancelled() }}
needs: [ build-amplify-swift ]
env:
EXIT_CODE: ${{ contains(needs.*.result, 'failure') && 1 || 0 }}
steps:
- run: exit $EXIT_CODE