-
-
Notifications
You must be signed in to change notification settings - Fork 244
76 lines (75 loc) · 2.97 KB
/
release.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
name: release
on: push
jobs:
release:
runs-on: macos-12
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install the Apple certificate and provisioning profile
uses: apple-actions/import-codesign-certs@v1
with:
keychain: app-signing
p12-file-base64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
p12-password: ${{ secrets.P12_PASSWORD }}
- name: Get Sparkle key
env:
PRIVATE_SPARKLE_KEY: ${{ secrets.PRIVATE_SPARKLE_KEY }}
run: 'echo "${{ env.PRIVATE_SPARKLE_KEY }}" | base64 -d -o eddsa_private.key'
- name: Install Python Requirements
run: pip3 install requests xmltodict
- name: Install Brew Requirements
run: brew install coreutils pandoc
- name: Setup Sparkle
env:
SPARKLE_VERSION: '2.4.1'
SPARKLE_HASH: '1cbfba4fc55a4ac1c66767333c353870acbfe05a43d5756cc1204fd4ebf2ba77'
run: |
curl -L "https://github.com/sparkle-project/Sparkle/releases/download/${{ env.SPARKLE_VERSION }}/Sparkle-${{ env.SPARKLE_VERSION }}.tar.xz" -o Sparkle.tar.xz
if [[ '${{ env.SPARKLE_HASH }}' != "$(sha256sum Sparkle.tar.xz | cut -d " " -f 1)" ]]; then
echo "Sparkle download hash does not match!"
exit 1
fi
mkdir sparkle && cd sparkle
tar -xf ../Sparkle.tar.xz
- name: Build app
run: |
xcodebuild -project Hackintool.xcodeproj -target Hackintool -configuration Release build ARCHS=x86_64 -verbose CONFIGURATION_BUILD_DIR=build
rm -R build/EagerLinkingTBDs
rm -R build/Hackintool.app.dSYM
rm -R build/Hackintool.build
rm -R build/SharedPrecompiledHeaders
rm -R build/XCBuildData
- name: Get version
id: version
run: |
output=$(xcodebuild -project Hackintool.xcodeproj -configuration Release -showBuildSettings | grep MARKETING_VERSION | tr -d 'MARKETING_VERSION = ')
echo "::set-output name=result::$output"
- name: Compress Files
uses: thedoctor0/[email protected]
with:
type: zip
directory: build
filename: Hackintool.zip
- name: Clean up
run: rm -R build/Hackintool.app
- name: Generate appcast.xml
run: sparkle/bin/generate_appcast --ed-key-file eddsa_private.key -o build/appcast.xml build
- name: Upload to Artifacts
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: build/*
- name: Upload to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/*
tag: ${{ steps.version.outputs.result }}
overwrite: true
file_glob: true
- name: Clean up keychain and provisioning profile
if: ${{ always() }}
run: |
security delete-keychain app-signing.keychain
rm eddsa_private.key