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: | Swift/.build/checkouts Swift/.build/repositories Swift/.build/prebuilts key: ${{ runner.os }}-swift-${{ hashFiles('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.0.8 with: godot-version: 4.6.1-stable host-os: macos host-arch: arm64 project-path: "./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.build-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: | Swift/.build/checkouts Swift/.build/repositories Swift/.build/prebuilts key: ${{ runner.os }}-swift-${{ hashFiles('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.0.8 with: godot-version: 4.6.1-stable host-os: windows host-arch: x86_64 project-path: "./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.build-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: | Swift/.build/checkouts Swift/.build/repositories Swift/.build/prebuilts key: ${{ runner.os }}-swift-${{ hashFiles('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.0.8 with: godot-version: 4.6.1-stable host-os: linux host-arch: arm64 project-path: "./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.build-directory }}/*"