-
-
Notifications
You must be signed in to change notification settings - Fork 32
52 lines (45 loc) · 1.71 KB
/
xcodegen.yml
File metadata and controls
52 lines (45 loc) · 1.71 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
# XcodeGen drift gate.
#
# The .xcodeproj is generated from `project.yml` but committed to the repo so
# contributors can `open Cotabby.xcodeproj` without installing XcodeGen first.
# That convenience only holds if the committed project stays byte-identical to
# what `xcodegen generate` produces. This job regenerates on every PR and fails
# if the result differs from what's checked in — catching the case where
# someone edits the project in Xcode (or hand-edits the pbxproj) without
# mirroring the change into `project.yml`.
#
# Sibling to Build/Lint/Tests: one gate, one file, one clear failure mode.
name: XcodeGen
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: xcodegen-${{ github.ref }}
cancel-in-progress: true
jobs:
drift:
name: project.yml matches Cotabby.xcodeproj
runs-on: macos-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install / verify XcodeGen
run: |
if ! command -v xcodegen >/dev/null; then
brew install xcodegen
fi
xcodegen --version
- name: Regenerate project
run: xcodegen generate
# XcodeGen only rewrites the tracked project files (pbxproj + shared
# schemes); Package.resolved is gitignored and untouched here. Scope the
# check to the project so unrelated working-tree noise can't fail it.
- name: Verify no drift
run: |
if ! git diff --exit-code -- Cotabby.xcodeproj; then
echo "::error::Cotabby.xcodeproj is out of sync with project.yml." \
"Run 'xcodegen generate' and commit the result." >&2
exit 1
fi