forked from DexterSLamb/itlwm
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (45 loc) · 1.61 KB
/
Copy pathmain.yml
File metadata and controls
59 lines (45 loc) · 1.61 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
name: CD
on:
push:
branches: master
permissions:
contents: write
env:
BUILD_OUTPUT: 'build/Build/Products/Debug'
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '5'
- name: Manage Version
run: |
git fetch --prune --unshallow --tags
GIT_SHA="$(git rev-parse --short HEAD)"
eval $(grep -m 1 "MODULE_VERSION =" itlwm.xcodeproj/project.pbxproj | tr -d ';' | tr -d '\t' | tr -d " ")
echo "SHORT_SHA=$GIT_SHA" >> $GITHUB_ENV
echo "ITLWM_VER=$MODULE_VERSION" >> $GITHUB_ENV
- name: Install MacKernelSDK
run: |
git clone --depth=1 https://github.com/acidanthera/MacKernelSDK.git
- name: Build itlwm
run: |
xcodebuild -scheme itlwm -configuration Debug -derivedDataPath build GIT_COMMIT=_${SHORT_SHA} | xcpretty && exit ${PIPESTATUS[0]}
- name: Build AirportItlwm
run: |
xcodebuild -scheme "AirportItlwm (all)" -configuration Debug -derivedDataPath build GIT_COMMIT=_${SHORT_SHA} | xcpretty && exit ${PIPESTATUS[0]}
- name: Pack Artifacts
run: |
cd $BUILD_OUTPUT
zip -r itlwm-v${ITLWM_VER}-${SHORT_SHA}.zip itlwm.kext
while read -r tgt ; do
zip -r AirportItlwm-${tgt// /_}-v${ITLWM_VER}-${SHORT_SHA}.zip "$tgt"
done < <(find . -mindepth 1 -maxdepth 1 -type d -not -path "*.kext" | cut -c 3-)
cd -
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: kexts-${{ env.SHORT_SHA }}
path: ${{ env.BUILD_OUTPUT }}/*.zip
retention-days: 30