-
Notifications
You must be signed in to change notification settings - Fork 89
55 lines (45 loc) · 1.67 KB
/
xcodebuild.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
name: macOS
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
strategy:
matrix:
os: ["macos-latest"]
include:
- os: macos-latest
binary_path: Client/build/SonyHeadphonesClient.zip
artifact_name: "SonyHeadphonesClient-macOS.zip"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Create build directory
working-directory: ${{github.workspace}}/Client
run: mkdir build
- name: Build
working-directory: ${{github.workspace}}/Client/build
# Execute the build.
run: xcodebuild -project '../macos/SonyHeadphonesClient.xcodeproj' -config Release -scheme 'SonyHeadphonesClient' -archivePath ./archive archive | xcpretty
- name: Export archive to .app
working-directory: ${{github.workspace}}/Client/build
# Exports the archive to a .app file
run: xcodebuild -exportArchive -archivePath ./archive.xcarchive -exportPath ./ -exportOptionsPlist ../macos/exportOptions.plist | xcpretty
- name: Zip the exported file
working-directory: ${{github.workspace}}/Client/build
# Zip the application for easier downloading
run: zip -r SonyHeadphonesClient.zip SonyHeadphonesClient.app
- name: Upload the zipped application
uses: actions/upload-artifact@v3
with:
# Artifact name
name: ${{ matrix.artifact_name }}
# A file, directory or wildcard pattern that describes what to upload
path: ${{github.workspace}}/${{matrix.binary_path}}
# The desired behavior if no files are found using the provided path.