Automate creation of Godot builds [skip ci]
This commit is contained in:
@@ -0,0 +1,168 @@
|
||||
name: Godot Release Export
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
macos:
|
||||
name: macOS
|
||||
runs-on: macos-26
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./Swift
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: true
|
||||
|
||||
- name: Cache Build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: "${{github.workspace}}/Swift/.build"
|
||||
key: ${{ runner.os }}-swift-${{ hashFiles("${{github.workspace}}/Swift/Package.resolved") }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-swift-
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
swift build -c release -Xswiftc -no-verify-emitted-module-interface
|
||||
BIN_PATH=$(swift build -c release --show-bin-path)
|
||||
mkdir -p "${{github.workspace}}/artifacts/"
|
||||
cp "$BIN_PATH/libLogic.dylib" "${{github.workspace}}/artifacts/"
|
||||
cp "$BIN_PATH/libSwiftGodot.dylib" "${{github.workspace}}/artifacts/"
|
||||
|
||||
- name: Copy build files
|
||||
run: |
|
||||
cp -r "${{github.workspace}}/artifacts/." "${{github.workspace}}/Godot/bin/"
|
||||
|
||||
- name: Godot Export
|
||||
id: export
|
||||
uses: https://git.omgitsalexl.me/omgitsalexl/export-godot-project@v1
|
||||
with:
|
||||
godot-version: 4.6.1-release
|
||||
host-os: macOS
|
||||
host-arch: arm64
|
||||
project-path: "${{github.workspace}}/Godot"
|
||||
export-mode: debug
|
||||
export-preset: macOS
|
||||
export-file-name: Sample.zip
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Build-macOS
|
||||
path: "${{ steps.export.outputs.archive_directory }}/*"
|
||||
|
||||
windows:
|
||||
name: Windows
|
||||
runs-on: windows-11
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./Swift
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache Build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: "${{github.workspace}}/Swift/.build"
|
||||
key: ${{ runner.os }}-swift-${{ hashFiles("${{github.workspace}}/Swift/Package.resolved") }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-swift-
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
swift build -c release -Xswiftc -no-verify-emitted-module-interface
|
||||
$binPath = swift build -c release --show-bin-path
|
||||
New-Item -ItemType Directory -Path "${{github.workspace}}/artifacts" -Force
|
||||
Copy-Item -Path "$binPath/Logic.dll" -Destination "${{github.workspace}}/artifacts/"
|
||||
Copy-Item -Path "$binPath/SwiftGodot.dll" -Destination "${{github.workspace}}/artifacts/"
|
||||
|
||||
- name: Bundle Logic DLLs
|
||||
uses: https://git.omgitsalexl.me/omgitsalexl/windows-collect-dependencies@v1.0.3
|
||||
with:
|
||||
executable: "${{github.workspace}}/artifacts/Logic.dll"
|
||||
output: "${{github.workspace}}/artifacts/"
|
||||
|
||||
- name: Copy build files
|
||||
run: |
|
||||
Copy-Item -Path "${{github.workspace}}/artifacts/." -Destination "${{github.workspace}}/Godot/bin/"
|
||||
|
||||
- name: Godot Export
|
||||
id: export
|
||||
uses: https://git.omgitsalexl.me/omgitsalexl/export-godot-project@v1
|
||||
with:
|
||||
godot-version: 4.6.1-release
|
||||
host-os: Windows
|
||||
host-arch: arm64
|
||||
project-path: "${{github.workspace}}/Godot"
|
||||
export-mode: debug
|
||||
export-preset: Windows
|
||||
export-file-name: Sample.zip
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Build-Windows
|
||||
path: "${{ steps.export.outputs.archive_directory }}/*"
|
||||
|
||||
ubuntu:
|
||||
name: Ubuntu
|
||||
runs-on: ubuntu-24.04
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./Swift
|
||||
container:
|
||||
image: git.omgitsalexl.me/omgitsalexl/ci-swift:6.3.3
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache Build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: "${{github.workspace}}/Swift/.build"
|
||||
key: ${{ runner.os }}-swift-${{ hashFiles("${{github.workspace}}/Swift/Package.resolved") }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-swift-
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
swift build -c release -Xswiftc -no-verify-emitted-module-interface
|
||||
BIN_PATH=$(swift build -c release --show-bin-path)
|
||||
mkdir -p "${{github.workspace}}/artifacts/"
|
||||
cp "$BIN_PATH/libLogic.so" "${{github.workspace}}/artifacts/"
|
||||
cp "$BIN_PATH/libSwiftGodot.so" "${{github.workspace}}/artifacts/"
|
||||
|
||||
- name: Bundle libLogic Libraries
|
||||
uses: https://git.omgitsalexl.me/omgitsalexl/linux-collect-dependencies@v1.0.1
|
||||
with:
|
||||
executable: "${{github.workspace}}/artifacts/libLogic.so"
|
||||
output: "${{github.workspace}}/artifacts/"
|
||||
|
||||
- name: Copy build files
|
||||
run: |
|
||||
cp -r "${{github.workspace}}/artifacts/." "${{github.workspace}}/Godot/bin/"
|
||||
|
||||
- name: Godot Export
|
||||
id: export
|
||||
uses: https://git.omgitsalexl.me/omgitsalexl/export-godot-project@v1
|
||||
with:
|
||||
godot-version: 4.6.1-release
|
||||
host-os: Linux
|
||||
host-arch: arm64
|
||||
project-path: "${{github.workspace}}/Godot"
|
||||
export-mode: debug
|
||||
export-preset: Linux
|
||||
export-file-name: Sample.zip
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Build-Linux
|
||||
path: "${{ steps.export.outputs.archive_directory }}/*"
|
||||
Reference in New Issue
Block a user