Update macos dmg build
This commit is contained in:
parent
fda694be61
commit
a5907302e5
42
.github/workflows/macos.yml
vendored
42
.github/workflows/macos.yml
vendored
@ -1,10 +1,16 @@
|
|||||||
name: MacOs DMG
|
name: Macos Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
upload_artifacts:
|
||||||
|
description: Should upload artifacts or not
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-dmg:
|
build-dmg:
|
||||||
@ -30,33 +36,17 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build -t install
|
run: cmake --build build -t install
|
||||||
|
|
||||||
- name: Create macOS app structure
|
|
||||||
run: |
|
|
||||||
mkdir -p VoxelEngine.app/Contents/MacOS
|
|
||||||
mkdir -p VoxelEngine.app/Contents/Resources
|
|
||||||
cp build/VoxelEngine VoxelEngine.app/Contents/MacOS/
|
|
||||||
cp -r res VoxelEngine.app/Contents/Resources/
|
|
||||||
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > VoxelEngine.app/Contents/Info.plist
|
|
||||||
echo "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">" >> VoxelEngine.app/Contents/Info.plist
|
|
||||||
echo "<plist version=\"1.0\">" >> VoxelEngine.app/Contents/Info.plist
|
|
||||||
echo "<dict>" >> VoxelEngine.app/Contents/Info.plist
|
|
||||||
echo " <key>CFBundleExecutable</key>" >> VoxelEngine.app/Contents/Info.plist
|
|
||||||
echo " <string>VoxelEngine</string>" >> VoxelEngine.app/Contents/Info.plist
|
|
||||||
echo " <key>CFBundleIdentifier</key>" >> VoxelEngine.app/Contents/Info.plist
|
|
||||||
echo " <string>com.yourcompany.VoxelEngine</string>" >> VoxelEngine.app/Contents/Info.plist
|
|
||||||
echo " <key>CFBundleName</key>" >> VoxelEngine.app/Contents/Info.plist
|
|
||||||
echo " <string>VoxelEngine</string>" >> VoxelEngine.app/Contents/Info.plist
|
|
||||||
echo " <key>CFBundleVersion</key>" >> VoxelEngine.app/Contents/Info.plist
|
|
||||||
echo " <string>1.0</string>" >> VoxelEngine.app/Contents/Info.plist
|
|
||||||
echo "</dict>" >> VoxelEngine.app/Contents/Info.plist
|
|
||||||
echo "</plist>" >> VoxelEngine.app/Contents/Info.plist
|
|
||||||
|
|
||||||
- name: Create DMG
|
- name: Create DMG
|
||||||
|
if: ${{ inputs.upload_artifacts }}
|
||||||
run: |
|
run: |
|
||||||
hdiutil create VoxelEngine.dmg -volname "VoxelEngine" -srcfolder VoxelEngine.app -ov -format UDZO
|
mkdir VoxelEngineDmgContent
|
||||||
|
cp -r build/res VoxelEngineDmgContent/
|
||||||
|
cp -r build/VoxelEngine VoxelEngineDmgContent/
|
||||||
|
hdiutil create VoxelEngineMacApp.dmg -volname "VoxelEngine" -srcfolder VoxelEngineDmgContent -ov -format UDZO
|
||||||
|
|
||||||
- name: Upload DMG
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v2
|
if: ${{ inputs.upload_artifacts }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: VoxelEngineMacOs
|
name: VoxelEngineMacOs
|
||||||
path: VoxelEngine.dmg
|
path: VoxelEngineMacApp.dmg
|
||||||
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
@ -14,18 +14,35 @@ jobs:
|
|||||||
build_type: Release
|
build_type: Release
|
||||||
upload_artifacts: true
|
upload_artifacts: true
|
||||||
|
|
||||||
|
build_release_macos:
|
||||||
|
name: Build Release MacOS
|
||||||
|
uses: ./.github/workflows/macos.yml
|
||||||
|
with:
|
||||||
|
upload_artifacts: true
|
||||||
|
|
||||||
create_release:
|
create_release:
|
||||||
needs: build_release
|
needs: [build_release, build_release_macos]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: VoxelEngine
|
name: VoxelEngine
|
||||||
|
|
||||||
|
- name: Download artifacts (MacOS)
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: VoxelEngineMacOs
|
||||||
|
|
||||||
- name: Pack artifacts
|
- name: Pack artifacts
|
||||||
run: |
|
run: |
|
||||||
chmod +x VoxelEngine
|
chmod +x VoxelEngine
|
||||||
zip -r VoxelEngine.zip res VoxelEngine
|
zip -r VoxelEngine.zip res VoxelEngine
|
||||||
|
|
||||||
|
- name: Pack artifacts (MacOS DMG)
|
||||||
|
run: |
|
||||||
|
cp VoxelEngineMacApp.dmg VoxelEngine.dmg
|
||||||
|
|
||||||
- name: Grab and store version
|
- name: Grab and store version
|
||||||
run: |
|
run: |
|
||||||
tag_name=$(echo ${{ github.ref }} | grep -oE "v[^/]+$")
|
tag_name=$(echo ${{ github.ref }} | grep -oE "v[^/]+$")
|
||||||
@ -41,3 +58,4 @@ jobs:
|
|||||||
prerelease: false
|
prerelease: false
|
||||||
files: |
|
files: |
|
||||||
VoxelEngine.zip
|
VoxelEngine.zip
|
||||||
|
VoxelEngine.dmg
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user