-
Notifications
You must be signed in to change notification settings - Fork 17
55 lines (53 loc) · 2.07 KB
/
archive.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
54
55
name: Archive
on:
push:
jobs:
archive:
strategy:
matrix:
xcode: ["16.2"]
machine:
- "macOS-15"
runs-on: ${{ matrix.machine }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "2"
- name: Select Xcode
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app
- name: bundle install
run: bundle update --bundler && bundle install
- name: Install CocoaPods dependencies
run: bundle exec pod install
- run: git config --global core.quotepath false # for Ikemen on SwiftPM
- run: xcrun agvtool new-version -all ${{ github.run_id }}
- name: Build
run: |
set -o pipefail
xcodebuild \
-workspace iMast.xcworkspace -scheme "iMast iOS" -destination "generic/platform=iOS" \
archive -archivePath "./archive.xcarchive" \
CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" AD_HOC_CODE_SIGNING_ALLOWED=YES | tee ./xcodebuild.log | xcpretty -c
- uses: actions/upload-artifact@v4
if: always()
with:
name: xcodebuild.Xcode.${{ matrix.xcode }}.${{ matrix.machine }}.log
path: ./xcodebuild.log
- uses: actions/upload-artifact@v4
with:
name: iMast.iOS.GHA.run.${{ github.run_id }}.Xcode.${{ matrix.xcode }}.${{ matrix.machine }}.xcarchive
path: ./archive.xcarchive
- name: Export Stats
run: python3 .github/export_archive_stats.py ./archive.xcarchive | tee stats.json
- name: Upload Stats
run: |
curl -fvX POST --data-binary "@stats.json" -H "Content-Type: application/json" \
-H "X-Space-App-Key: ${{ secrets.BINSTATSD_API_KEY }}" \
-H "X-IBS-Branch: ${{ github.ref_name }}" \
-H "X-IBS-Commit: $(git rev-parse HEAD)" \
-H "X-IBS-Parent: $(git rev-parse HEAD^)" \
-H "X-IBS-Repo: ${{ github.repository }}" \
-H "X-IBS-RunID: ${{ github.run_id }}" \
-H "X-IBS-Platform: iOS" \
-H "User-Agent: iMast_BuildStatsUploader/1.0" \
https://${{ secrets.BINSTATSD_HOST }}/api/v1/register