-
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (77 loc) · 3.24 KB
/
code_sign_airlift.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
name: code_sign_airlift
on:
workflow_dispatch:
inputs:
release:
description: 'Release after build'
required: true
default: 'no'
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install create-dmg
run: npm install --global create-dmg
- name: Create Distribution directory
run: mkdir -p dist/bin
- name: Copy Local Distribution
run: |
mkdir -p dist/bin
cp -R ./bin/. ./dist/bin
- name: Verify Copied Files
run: |
echo "Checking copied files..."
ls -l ./dist/bin
- name: Prepare Directories
run: |
PARENT=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
mkdir -p "$PARENT/dist/bin"
- name: Copy Local Resources
run: |
PARENT=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cp -R ./bin/airlift "$PARENT/dist/bin"
cp -R ./bin/entitlements.plist "$PARENT/dist/bin"
- name: Verify Files
run: |
echo "Checking copied files..."
ls -l ./dist/bin
- name: Codesign Airlift
env:
APPLE_CERT_DATA: ${{ secrets.APPLE_CERT_DATA }}
APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
PARENT=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
APP="$PARENT/dist/bin/airlift"
ENTITLE="$PARENT/dist/bin/entitlements.plist"
ls -l "$PARENT/dist/bin"
echo $APPLE_CERT_DATA | base64 --decode > certificate.p12
security create-keychain -p $KEYCHAIN_PASSWORD build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain
security import certificate.p12 -k build.keychain -P $APPLE_CERT_PASSWORD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PASSWORD build.keychain
chmod +x "$ENTITLE"
/usr/bin/codesign --force -s $APPLE_TEAM_ID --identifier "co.theacharya.Airlift" --options runtime,library --entitlements "$ENTITLE" "$APP" -v
- name: Notarize Airlift
env:
APPLE_DEV_ID: ${{ secrets.APPLE_DEV_ID }}
APPLE_DEV_ID_PASSWORD: ${{ secrets.APPLE_DEV_ID_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
PARENT=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
APP="$PARENT/dist/bin/airlift"
echo "Create Keychain Profile"
xcrun notarytool store-credentials "notarytool-profile" --apple-id $APPLE_DEV_ID --password $APPLE_DEV_ID_PASSWORD --team-id $APPLE_TEAM_ID
echo "Creating Temp Notarization Archive"
ditto -c -k --keepParent "$APP" "notarization.zip"
echo "Notarize App"
xcrun notarytool submit "notarization.zip" --keychain-profile "notarytool-profile" --progress --wait
- name: Verify Codesign Airlift
run: |
PARENT=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
APP="$PARENT/dist/bin/airlift"
/usr/bin/codesign -dv --verbose=4 "$APP"