-
Notifications
You must be signed in to change notification settings - Fork 13
60 lines (56 loc) · 1.72 KB
/
xcode-build.yml
File metadata and controls
60 lines (56 loc) · 1.72 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
name: Xcode - Build and Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build and Test
strategy:
max-parallel: 2
fail-fast: false
matrix:
macos-version: [macos-15, macos-26]
runs-on: ${{ matrix.macos-version }}
env:
scheme: ${{ 'Mactrix' }}
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
xcodebuild clean build analyze \
-scheme "$scheme" \
-project Mactrix.xcodeproj \
-destination 'platform=macOS' | xcpretty && exit ${PIPESTATUS[0]}
- name: Test
run: |
xcodebuild test \
-scheme "$scheme" \
-project Mactrix.xcodeproj \
-destination 'platform=macOS' | xcpretty && exit ${PIPESTATUS[0]}
- name: Build release artifact
if: |
matrix.macos-version == 'macos-26' &&
github.event_name == 'push' &&
github.ref == 'refs/heads/main'
run: |
xcodebuild archive \
-project Mactrix.xcodeproj \
-scheme "$scheme" \
-configuration Release \
-destination 'platform=macOS' \
-archivePath ./Mactrix.xcarchive | xcpretty && exit ${PIPESTATUS[0]}
- name: Upload Artifact
if: |
matrix.macos-version == 'macos-26' &&
github.event_name == 'push' &&
github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: Mactrix.app
path: ./Mactrix.xcarchive/Products/Applications/