Skip to content

Commit

Permalink
wip: codesign dylibs
Browse files Browse the repository at this point in the history
  • Loading branch information
jolexxa committed Jan 14, 2025
1 parent e500975 commit 18e67e6
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 15 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ jobs:
submodules: "recursive"
fetch-depth: 0 # So we can get all tags.

- name: 🧾 Checkout
uses: actions/checkout@v4
with:
repository: chickensoft-games/codesigning
token: ${{ secrets.GH_BASIC }}
ref: main
lfs: true
path: codesigning

- name: 🔑 Add Certificate
run: |
security default-keychain -s login.keychain
security add-certificates \
codesigning/chickensoft_mac_app_distribution.cer
security find-identity -v -p codesigning
- uses: actions/setup-dotnet@v4
name: 💽 Setup .NET SDK
with:
Expand All @@ -39,6 +55,21 @@ jobs:
chmod +x ./build.sh
./build.sh macos
- name: 🔐 Codesign Dylibs
run: |
CERT=$(cat codesigning/cer_id)
codesign --sign $CERT --options runtime \
addons/platform/builds/macos/Platform.osx.arm64.dylib
codesign --sign $CERT --options runtime \
addons/platform/builds/macos/Platform.osx.x64.dylib
- name: 🧐 Verify Codesigning
run: |
codesign --verify --verbose=4 \
addons/platform/builds/macos/Platform.osx.arm64.dylib
codesign --verify --verbose=4 \
addons/platform/builds/macos/Platform.osx.x64.dylib
- name: ⬆️ Upload macOS artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
nupkg/
/build/
addons/platform/builds
codesigning/

coverage/*
!coverage/.gdignore
Expand Down
15 changes: 5 additions & 10 deletions addons/platform/platform.gdextension
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@ reloadable = false ; no way to do this with C# extensions (yet)

[libraries]

macos.debug.arm64 = "res://addons/platform/builds/macos/Platform.debug.osx.arm64.dylib"
macos.release.arm64 = "res://addons/platform/builds/macos/Platform.osx.arm64.dylib"
macos.debug.x64 = "res://addons/platform/builds/macos/Platform.debug.osx.x64.dylib"
macos.release.x64 = "res://addons/platform/builds/macos/Platform.osx.x64.dylib"
windows.debug.x86_64 = "res://addons/platform/builds/windows/Platform.debug.win.x64.dll"
windows.release.x86_64 = "res://addons/platform/builds/windows/Platform.win.x64.dll"
linux.debug.arm64 = "res://addons/platform/builds/linux/Platform.debug.linux.arm64.so"
linux.release.arm64 = "res://addons/platform/builds/linux/Platform.linux.arm64.so"
linux.debug.x64 = "res://addons/platform/builds/linux/Platform.debug.linux.x64.so"
linux.release.x64 = "res://addons/platform/builds/linux/Platform.linux.x64.so"
macos.arm64 = "res://addons/platform/builds/macos/Platform.osx.arm64.dylib"
macos.x64 = "res://addons/platform/builds/macos/Platform.osx.x64.dylib"
windows.x86_64 = "res://addons/platform/builds/windows/Platform.win.x64.dll"
linux.arm64 = "res://addons/platform/builds/linux/Platform.linux.arm64.so"
linux.x64 = "res://addons/platform/builds/linux/Platform.linux.x64.so"
5 changes: 0 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,18 @@ fi
case "$1" in
"macos")
echo "Publishing for macOS..."
dotnet publish Chickensoft.Platform -v:detailed -o ./addons/platform/builds/macos --self-contained -c Debug -r osx-arm64
dotnet publish Chickensoft.Platform -v:detailed -o ./addons/platform/builds/macos --self-contained -c Release -r osx-arm64
dotnet publish Chickensoft.Platform -v:detailed -o ./addons/platform/builds/macos --self-contained -c Debug -r osx-x64
dotnet publish Chickensoft.Platform -v:detailed -o ./addons/platform/builds/macos --self-contained -c Release -r osx-x64
;;

"windows")
echo "Publishing for Windows..."
dotnet publish Chickensoft.Platform -v:detailed -o ./addons/platform/builds/windows --self-contained -c Debug -r win-x64
dotnet publish Chickensoft.Platform -v:detailed -o ./addons/platform/builds/windows --self-contained -c Release -r win-x64
;;

"linux")
echo "Publishing for Linux..."
dotnet publish Chickensoft.Platform -v:detailed -o ./addons/platform/builds/linux --self-contained -c Debug -r linux-x64
dotnet publish Chickensoft.Platform -v:detailed -o ./addons/platform/builds/linux --self-contained -c Release -r linux-x64
dotnet publish Chickensoft.Platform -v:detailed -o ./addons/platform/builds/linux --self-contained -c Debug -r linux-arm64
dotnet publish Chickensoft.Platform -v:detailed -o ./addons/platform/builds/linux --self-contained -c Release -r linux-arm64
;;

Expand Down

0 comments on commit 18e67e6

Please sign in to comment.