-
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (77 loc) · 2.85 KB
/
ci.yml
File metadata and controls
96 lines (77 loc) · 2.85 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: ci
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
build_pack_ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- name: Install iOS workload
run: |
dotnet workload install ios
- name: Cache NuGet
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('global.json', '**/*.csproj') }}
- name: Cache SwiftPM scratch
uses: actions/cache@v4
with:
path: |
src/Kapusch.FacebookApisForiOSComponents/Native/iOS/build/spm
key: ${{ runner.os }}-swiftpm-${{ hashFiles('src/Kapusch.FacebookApisForiOSComponents/Native/iOS/KapuschFacebookAuthInterop/Package.resolved') }}
- name: Build iOS wrapper
run: |
bash src/Kapusch.FacebookApisForiOSComponents/Native/iOS/build.sh
- name: Collect Facebook xcframeworks
run: |
bash src/Kapusch.FacebookApisForiOSComponents/Native/iOS/collect-facebook-xcframeworks.sh
- name: Pack
run: |
dotnet pack src/Kapusch.FacebookApisForiOSComponents/Kapusch.FacebookApisForiOSComponents.csproj \
-c Release \
-o artifacts/nuget
- name: Validate nupkg layout
run: |
python3 - <<'PY'
import glob, sys, zipfile
nupkgs = glob.glob("artifacts/nuget/*.nupkg")
if not nupkgs:
print("ERROR: no .nupkg found under artifacts/nuget/")
sys.exit(1)
nupkg = sorted(nupkgs)[-1]
print(f"Validating {nupkg}")
z = zipfile.ZipFile(nupkg)
names = set(z.namelist())
required = [
"buildTransitive/Kapusch.Facebook.iOS.targets",
"kfb.xcframework/Info.plist",
"fb/FBAEMKit.xcframework/Info.plist",
"fb/FBSDKCoreKit.xcframework/Info.plist",
"fb/FBSDKCoreKit_Basics.xcframework/Info.plist",
"fb/FBSDKGamingServicesKit.xcframework/Info.plist",
"fb/FBSDKLoginKit.xcframework/Info.plist",
"fb/FBSDKShareKit.xcframework/Info.plist",
]
missing = [p for p in required if p not in names]
if missing:
print("ERROR: missing required paths in nupkg:")
for p in missing:
print(f" - {p}")
sys.exit(1)
# Guardrail: ensure the wrapper is not flattened at the package root.
if "Info.plist" in names:
print("ERROR: wrapper appears flattened (found 'Info.plist' at package root).")
sys.exit(1)
print("OK: nupkg layout looks correct.")
PY
- uses: actions/upload-artifact@v4
with:
name: nuget
path: artifacts/nuget/*.nupkg