forked from Sileo/Sileo
-
Notifications
You must be signed in to change notification settings - Fork 3
103 lines (90 loc) · 4.07 KB
/
main.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
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
97
98
99
100
101
102
103
on:
push:
branches:
- main
name: Build
jobs:
make:
name: Build and Upload Sileo
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@master
with:
submodules: recursive
token: ${{ secrets.SILEO_PAT }}
- name: Import all certificates
env:
DEVELOPMENT_PASSWORD: ${{ secrets.DEVELOPMENT_PASSWORD }}
DEVELOPMENT_CERTIFICATE: ${{ secrets.DEVELOPMENT_CERTIFICATE }}
DISTRIBUTION_CERTIFICATE: ${{ secrets.DISTRIBUTION_CERTIFICATE }}
DISTRIBUTION_PASSWORD: ${{ secrets.DISTRIBUTION_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
security create-keychain -p "" build.keychain
security list-keychains -s build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p "" build.keychain
security set-keychain-settings
security import <(echo $DEVELOPMENT_CERTIFICATE | base64 --decode) \
-f pkcs12 \
-k build.keychain \
-P $DEVELOPMENT_PASSWORD \
-T /usr/bin/codesign
security import <(echo $DISTRIBUTION_CERTIFICATE | base64 --decode) \
-f pkcs12 \
-k build.keychain \
-P $DISTRIBUTION_PASSWORD \
-T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain
- name: Setup Procursus Bootstrap (install)
run: |
wget https://apt.procurs.us/bootstraps/big_sur/bootstrap-darwin-amd64.tar.zst
sudo gtar --preserve-permissions -xkf ./bootstrap-darwin-amd64.tar.zst -C /
echo '/opt/procursus/sbin:/opt/procursus/bin' >> $GITHUB_PATH
PATH=/opt/procursus/sbin:/opt/procursus/bin:$PATH sudo /opt/procursus/bin/apt update
sudo /opt/procursus/bin/apt -V full-upgrade -y --allow-downgrades -oDpkg::Options::=--force-confdef -oDpkg::Options::=--force-confnew
continue-on-error: true
- name: Upgrade
run: |
sudo /opt/procursus/bin/apt -V upgrade -y --allow-downgrades -oDpkg::Options::=--force-confdef -oDpkg::Options::=--force-confnew
- name: Upgrade and install
run: |
sudo /opt/procursus/bin/apt install zstd apt-utils ldid xz-utils bzip2 lz4 -y --allow-downgrades -oDpkg::Options::=--force-confdef -oDpkg::Options::=--force-confnew
- name: Add Procursus to PATH
run: |
echo '/opt/procursus/sbin:/opt/procursus/bin' >> $GITHUB_PATH
- name: Select Correct Xcode (14.2)
run: |
sudo xcode-select --switch /Applications/Xcode_14.2.app
- name: Build Sileo Nightly (iphoneos-arm)
run: |
make clean package NIGHTLY=1 DEBUG=0 ALL_BOOTSTRAPS=1
- name: Build Sileo Nightly (iphoneos-arm64)
run: |
make clean package NIGHTLY=1 DEBUG=0 ALL_BOOTSTRAPS=1 SILEO_PLATFORM=iphoneos-arm64
- name: Build Sileo Nightly (darwin-amd64)
run: |
make clean package NIGHTLY=1 DEBUG=0 AUTOMATION=1 SILEO_PLATFORM=darwin-amd64
- name: Build Sileo Nightly (darwin-arm64)
run: |
make clean package NIGHTLY=1 DEBUG=0 AUTOMATION=1 SILEO_PLATFORM=darwin-arm64
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Push To Repo
env:
AMY_GITHUB_TOKEN: ${{ secrets.AMY_GITHUB }}
run: |
git config --global user.name "Amy While (Automated)"
git config --global user.email "[email protected]"
git config --global credential.helper cache
git clone https://${{ env.AMY_GITHUB_TOKEN }}@github.com/elihwyma/amy-repo.git
mv packages/* amy-repo/pool/
cd amy-repo
./repo.sh
git add .
git commit -m "build: sileo"
git push