forked from LiveEnhancementSuite/LESforMacOS
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (72 loc) · 2.99 KB
/
Copy pathles_release.yml
File metadata and controls
72 lines (72 loc) · 2.99 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
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Publish
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer
steps:
- name: Cloning Git repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup Cocoapods
uses: maxim-lobanov/setup-cocoapods@v1
with:
podfile-path: Podfile.lock
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Install dependencies
run: |
brew install coreutils jq xcbeautify gawk gh gpg
pip3 install --user --break-system-packages --disable-pip-version-check -r requirements.txt
gem install --user t
gem install trainer
- name: Attempt to build the Live Enhancement Suite Custom for macOS
shell: bash
run: |
LOG_NAME="build_$(date +%s).log"
XCODE_ARGS="GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO GCC_TREAT_WARNINGS_AS_ERRORS=NO CLANG_ENABLE_CODE_COVERAGE=NO"
XCODE_ARGS+=" -enableAddressSanitizer NO -enableThreadSanitizer NO -enableUndefinedBehaviorSanitizer NO"
XCODE_ARGS+=" SDKROOT=${DEVELOPER_DIR}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk"
XCODE_ARGS+=" MACOSX_DEPLOYMENT_TARGET=11.0"
xcodebuild -workspace Hammerspoon.xcworkspace -scheme Release -configuration Release -destination platform=macOS build ${XCODE_ARGS} | \
tee ${LOG_NAME} | \
xcbeautify && exit ${PIPESTATUS[0]}
- name: Copy Hammerspoon binary to root for disk image packaging
run: |
mkdir release
cp -Rv ${HOME}/Library/Developer/Xcode/DerivedData/*/Build/Products/Release/*.app/ ./Live\ Enhancement\ Suite\ Custom.app/
- name: Set up environment for disk image creation
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Create Live Enhancement Suite Custom disk image
run: |
npm install -g create-dmg
create-dmg --dmg-title="LES Custom" Live\ Enhancement\ Suite\ Custom.app release 2>&1 || true
mv -v release/*.dmg release/LiveEnhancementSuiteCustom.dmg
sha256sum release/LiveEnhancementSuiteCustom.dmg | tee release/LiveEnhancementSuiteCustom.dmg.sha256sum
- name: Upload disk image as release asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/LiveEnhancementSuiteCustom.dmg
asset_name: LiveEnhancementSuiteCustom.dmg
tag: ${{ github.ref }}
overwrite: true
- name: Upload checksum as release asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/LiveEnhancementSuiteCustom.dmg.sha256sum
asset_name: LiveEnhancementSuiteCustom.dmg.sha256sum
tag: ${{ github.ref }}
overwrite: true