-
Notifications
You must be signed in to change notification settings - Fork 492
53 lines (48 loc) · 1.17 KB
/
build-app.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: "Build application"
on:
push:
branches: [ main ]
paths:
- OpenHaystack/**
pull_request:
branches: [ main ]
paths:
- OpenHaystack/**
env:
APP: OpenHaystack
defaults:
run:
working-directory: OpenHaystack
jobs:
format-swift:
runs-on: macos-12
steps:
- name: "Checkout code"
uses: actions/checkout@v2
- name: "Install swift-format"
run: brew install swift-format
- name: "Run swift-format"
run: swift-format lint --recursive .
format-objc:
runs-on: macos-12
steps:
- name: "Checkout code"
uses: actions/checkout@v2
- name: "Install clang-format"
run: brew install clang-format
- name: "Run clang-format"
run: clang-format -n **/*.{h,m}
build-app:
runs-on: macos-12
needs:
- format-swift
- format-objc
steps:
- name: "Checkout code"
uses: actions/checkout@v2
- name: "Select Xcode 13"
uses: devbotsxyz/xcode-select@v1
with:
version: "13"
- name: "Archive project"
run: xcodebuild archive -scheme ${APP} -configuration release -archivePath ${APP}.xcarchive