try mac universal combination build
This commit is contained in:
65
.github/workflows/mac-universal.yml
vendored
Normal file
65
.github/workflows/mac-universal.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
name: Mac universal build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- universal
|
||||
release:
|
||||
types: [published]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-14
|
||||
env:
|
||||
CONFIGURATION: ${{ matrix.configuration }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
configuration:
|
||||
- Release
|
||||
- Debug
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Download macos-intel
|
||||
- uses: robinraju/release-downloader@v1
|
||||
id: download
|
||||
with:
|
||||
latest: true
|
||||
fileName: 'cboe-macos-intel-${{ matrix.configuration }}.tar'
|
||||
extract: true
|
||||
out-file-path: 'cboe-macos-intel-${{ matrix.configuration }}'
|
||||
|
||||
# Download macos-silicon
|
||||
- uses: robinraju/release-downloader@v1
|
||||
with:
|
||||
latest: true
|
||||
fileName: 'cboe-macos-silicon-${{ matrix.configuration }}.tar'
|
||||
extract: true
|
||||
out-file-path: 'cboe-macos-silicon-${{ matrix.configuration }}'
|
||||
|
||||
- run: .github/workflows/scripts/mac/make-universal.sh
|
||||
|
||||
# Codesigning is handled by the universal workflow!
|
||||
- name: Codesign and notarize
|
||||
run: 'NOTARIZE="no" ./github/workflows/scripts/mac/sign-apps.sh'
|
||||
if: ${{ matrix.os.name == 'macos' }}
|
||||
|
||||
- name: 'Tar files'
|
||||
run: 'tar -cvf cboe-macos-universal-${{matrix.configuration}}.tar "build/Blades of Exile"
|
||||
|
||||
# Upload everything as artifact
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mac-universal-dependencies-${{matrix.configuration}}
|
||||
path: cboe-macos-universal-${{matrix.configuration}}.tar
|
||||
|
||||
# upload a release
|
||||
- name: Github release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: cboe-macos-universal-${{ matrix.configuration }}.tar
|
||||
tag_name: ${{ steps.download.outputs.tag_name }}
|
||||
|
||||
- name: 'Itch.io release'
|
||||
run: './.github/workflows/scripts/butler_push.sh'
|
||||
shell: bash
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.configuration == 'Release' }}
|
23
.github/workflows/scripts/mac/make-universal.sh
vendored
Normal file
23
.github/workflows/scripts/mac/make-universal.sh
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
#! /bin/bash
|
||||
|
||||
if [ -z "$CONFIGURATION" ]; then
|
||||
CONFIGURATION=Release
|
||||
fi
|
||||
|
||||
INTEL=cboe-macos-intel-$CONFIGURATION
|
||||
SILICON=cboe-macos-silicon-$CONFIGURATION
|
||||
|
||||
mkdir "build/Blades of Exile"
|
||||
|
||||
combine() {
|
||||
mkdir -p "build/Blades of Exile/$1.app/Contents/MacOS"
|
||||
lipo -create "$SILICON/Blades of Exile/$1.app/Contents/MacOS/$1" "$INTEL/Blades of Exile/$1.app/Contents/MacOS/$1" -output "build/Blades of Exile/$1.app/Contents/MacOS"
|
||||
cp -r "$SILICON/Blades of Exile/$1.app/Contents/Frameworks" "build/Blades of Exile/$1.app/Contents/"
|
||||
cp -r "$SILICON/Blades of Exile/$1.app/Contents/Resources" "build/Blades of Exile/$1.app/Contents/"
|
||||
cp "$SILICON/Blades of Exile/$1.app/Contents/Info.plist" "build/Blades of Exile/$1.app/Contents/"
|
||||
cp "$SILICON/Blades of Exile/$1.app/Contents/PkgInfo" "build/Blades of Exile/$1.app/Contents/"
|
||||
}
|
||||
|
||||
combine "Blades of Exile"
|
||||
combine "BoE Scenario Editor"
|
||||
combine "BoC Character Editor"
|
Reference in New Issue
Block a user