|
1 |
| -name: Release LES for macOS |
2 |
| - |
| 1 | +name: Publish |
3 | 2 | on:
|
4 | 3 | push:
|
5 | 4 | tags:
|
6 |
| - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 |
7 |
| - |
| 5 | + - 'v*' |
| 6 | +permissions: |
| 7 | + contents: write |
8 | 8 | jobs:
|
9 | 9 | build:
|
10 |
| - runs-on: macos-11 |
| 10 | + runs-on: macos-12 |
| 11 | + env: |
| 12 | + DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer |
11 | 13 | steps:
|
12 | 14 | - name: Cloning Git repository
|
13 |
| - uses: actions/checkout@v1 |
| 15 | + uses: actions/checkout@v3 |
14 | 16 | with:
|
15 | 17 | submodules: 'recursive'
|
16 |
| - - name: Prepare build environment |
17 |
| - run: ./scripts/github-ci-pre.sh |
| 18 | + - name: Setup Cocoapods |
| 19 | + uses: maxim-lobanov/setup-cocoapods@v1 |
| 20 | + with: |
| 21 | + podfile-path: Podfile.lock |
| 22 | + - name: Setup Ruby |
| 23 | + uses: ruby/setup-ruby@v1 |
| 24 | + with: |
| 25 | + ruby-version: '3.0' |
| 26 | + - name: Install dependencies |
| 27 | + run: | |
| 28 | + brew install coreutils jq xcbeautify gawk gh gpg |
| 29 | + pip3 install --user --disable-pip-version-check -r requirements.txt |
| 30 | + gem install --user t |
| 31 | + gem install trainer |
18 | 32 | - name: Attempt to build the Live Enhancement Suite for macOS
|
| 33 | + shell: bash |
19 | 34 | run: |
|
20 |
| - xcodebuild -workspace Hammerspoon.xcworkspace -scheme Hammerspoon -configuration Debug clean build | tee $(date +%s).log | xcbeautify |
| 35 | + export LOG_NAME="build_$(date +%s).log" |
| 36 | + export XCODE_ARGS="clean build" |
| 37 | + export XCODE_ARGS="${XCODE_ARGS} GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO GCC_TREAT_WARNINGS_AS_ERRORS=NO CLANG_ENABLE_CODE_COVERAGE=NO" |
| 38 | + export XCODE_ARGS="${XCODE_ARGS} -enableAddressSanitizer NO -enableThreadSanitizer NO -enableUndefinedBehaviorSanitizer NO" |
| 39 | + export XCODE_ARGS="${XCODE_ARGS} SDKROOT=${DEVELOPER_DIR}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk" |
| 40 | + export XCODE_ARGS="${XCODE_ARGS} MACOSX_DEPLOYMENT_TARGET=11.0" |
| 41 | + xcodebuild -workspace Hammerspoon.xcworkspace -scheme Release -configuration Release ${XCODE_ARGS} | \ |
| 42 | + tee ${LOG_NAME} | \ |
| 43 | + xcbeautify && exit ${PIPESTATUS[0]} |
21 | 44 | - name: Copy Hammerspoon binary to root for disk image packaging
|
22 | 45 | run: |
|
23 | 46 | mkdir release
|
24 |
| - ditto $HOME/Library/Developer/Xcode/DerivedData/Hammerspoon-*/Build/Products/Debug/*.app/ ./Live\ Enhancement\ Suite.app/ |
| 47 | + cp -Rv ${HOME}/Library/Developer/Xcode/DerivedData/*/Build/Products/Release/*.app/ ./Live\ Enhancement\ Suite.app/ |
25 | 48 | - name: Set up environment for disk image creation
|
26 |
| - uses: actions/setup-node@v1 |
| 49 | + uses: actions/setup-node@v3 |
27 | 50 | with:
|
28 |
| - node-version: '10.x' |
| 51 | + node-version: '14.x' |
29 | 52 | - name: Create Live Enhancement Suite disk image
|
30 | 53 | run: |
|
31 | 54 | npm install -g create-dmg
|
32 | 55 | create-dmg --dmg-title="Live Enhancement Suite" Live\ Enhancement\ Suite.app release 2>&1 || true
|
33 |
| - mv release/*.dmg release/LiveEnhancementSuite.dmg |
34 |
| - shasum release/*.dmg >> release/CHECKSUM_SHA256.txt |
| 56 | + mv -v release/*.dmg release/LiveEnhancementSuite.dmg |
| 57 | + shasum release/*.dmg | tee release/CHECKSUM_SHA256.txt |
35 | 58 | - name: Upload disk image as release asset
|
36 |
| - uses: svenstaro/upload-release-action@v1-release |
| 59 | + uses: svenstaro/upload-release-action@v2 |
37 | 60 | with:
|
38 | 61 | repo_token: ${{ secrets.GITHUB_TOKEN }}
|
39 | 62 | file: release/LiveEnhancementSuite.dmg
|
40 | 63 | asset_name: LiveEnhancementSuite.dmg
|
41 | 64 | tag: ${{ github.ref }}
|
42 | 65 | overwrite: true
|
43 | 66 | - name: Upload checksum as release asset
|
44 |
| - uses: svenstaro/upload-release-action@v1-release |
| 67 | + uses: svenstaro/upload-release-action@v2 |
45 | 68 | with:
|
46 | 69 | repo_token: ${{ secrets.GITHUB_TOKEN }}
|
47 | 70 | file: release/CHECKSUM_SHA256.txt
|
|
0 commit comments