Compare commits
19 Commits
cb518961e7
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 28c5f3ac1a | |||
| 9852d6da0a | |||
| 091e8c086a | |||
| b10a2ebdc9 | |||
| d2a0b0b007 | |||
| 048ea69d47 | |||
| d753ce67c3 | |||
| c0751c34df | |||
| 3341125442 | |||
| 4f9cf7f62b | |||
| 1951a0f2e7 | |||
| 39ab19eec0 | |||
| d2f16fee48 | |||
| faf7449802 | |||
| 7266590bbf | |||
| b38656c923 | |||
| 91bd5428a7 | |||
| 55cc53dad4 | |||
| d605edf6bf |
21
.github/workflows/auto_release.yaml
vendored
21
.github/workflows/auto_release.yaml
vendored
@@ -14,10 +14,10 @@
|
||||
# You can disable this action by setting the DISABLE_AUTO_RELEASE repository
|
||||
# variable to true.
|
||||
|
||||
name: '🦾 Auto-Release'
|
||||
name: 'Auto-Release'
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["🚥 Tests"]
|
||||
workflows: ["Tests"]
|
||||
branches:
|
||||
- main
|
||||
types:
|
||||
@@ -25,25 +25,25 @@ on:
|
||||
|
||||
jobs:
|
||||
auto_release:
|
||||
name: 🦾 Auto-Release
|
||||
name: Auto-Release
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
should_release: ${{ steps.release.outputs.should_release }}
|
||||
steps:
|
||||
- name: 🧾 Checkout
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
# Use your GitHub Personal Access Token variable here.
|
||||
token: ${{ secrets.GH_BASIC }}
|
||||
token: ${{ secrets.NUGET_KEY }}
|
||||
lfs: true
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: 🧑🔬 Check Test Results
|
||||
- name: Check Test Results
|
||||
id: tests
|
||||
run: |
|
||||
echo "passed=${{ github.event.workflow_run.conclusion == 'success' }}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: 📄 Check If Dependencies Changed
|
||||
- name: Check If Dependencies Changed
|
||||
id: deps
|
||||
run: |
|
||||
message=$(git log -1 --pretty=%B)
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
echo "changed=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: 📝 Check Release Status
|
||||
- name: Check Release Status
|
||||
id: release
|
||||
run: |
|
||||
echo "Tests passed: ${{ steps.tests.outputs.passed }}"
|
||||
@@ -64,10 +64,10 @@ jobs:
|
||||
|
||||
if [[ ${{ steps.tests.outputs.passed }} == "true" && ${{ steps.deps.outputs.changed }} == "true" && $disable_auto_release != "true" ]]; then
|
||||
echo "should_release=true" >> "$GITHUB_OUTPUT"
|
||||
echo "🦾 Creating a release!"
|
||||
echo "Creating a release!"
|
||||
else
|
||||
echo "should_release=false" >> "$GITHUB_OUTPUT"
|
||||
echo "✋ Not creating a release."
|
||||
echo "Not creating a release."
|
||||
fi
|
||||
|
||||
trigger_release:
|
||||
@@ -79,3 +79,4 @@ jobs:
|
||||
GH_BASIC: ${{ secrets.GH_BASIC }}
|
||||
with:
|
||||
bump: patch
|
||||
#994139c880db4bab879ae724ce1ac43b87c88e42
|
||||
|
||||
50
.github/workflows/release.yaml
vendored
50
.github/workflows/release.yaml
vendored
@@ -1,4 +1,4 @@
|
||||
name: '📦 Release'
|
||||
name: 'Release'
|
||||
on:
|
||||
# Make a release whenever the developer wants.
|
||||
workflow_dispatch:
|
||||
@@ -26,31 +26,32 @@ on:
|
||||
default: "patch"
|
||||
jobs:
|
||||
release:
|
||||
name: '📦 Release'
|
||||
name: 'Release'
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
DOTNET_NOLOGO: true
|
||||
steps:
|
||||
- name: 🧾 Checkout
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
token: ${{ secrets.GH_BASIC }}
|
||||
lfs: true
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 0 # So we can get all tags.
|
||||
fetch-tags: true
|
||||
|
||||
- name: 🔎 Read Current Project Version
|
||||
- name: Read Current Project Version
|
||||
id: current-version
|
||||
uses: WyriHaximus/github-action-get-previous-tag@v2
|
||||
with:
|
||||
fallback: "0.0.0-devbuild"
|
||||
|
||||
- name: 🖨 Print Current Version
|
||||
- name: Print Current Version
|
||||
run: |
|
||||
echo "Current Version: ${{ steps.current-version.outputs.tag }}"
|
||||
|
||||
- name: 🧮 Compute Next Version
|
||||
- name: Compute Next Version
|
||||
uses: chickensoft-games/next-godot-csproj-version@v1
|
||||
id: next-version
|
||||
with:
|
||||
@@ -59,13 +60,12 @@ jobs:
|
||||
bump: ${{ inputs.bump }}
|
||||
|
||||
- uses: actions/setup-dotnet@v5
|
||||
name: 💽 Setup .NET SDK
|
||||
name: Setup .NET SDK
|
||||
with:
|
||||
# Use the .NET SDK from global.json in the root of the repository.
|
||||
global-json-file: global.json
|
||||
|
||||
# Write version to file so .NET will build correct version.
|
||||
- name: 📝 Write Version to File
|
||||
- name: Write Version to File
|
||||
uses: jacobtomlinson/gha-find-replace@v3
|
||||
with:
|
||||
find: "0.0.0-devbuild"
|
||||
@@ -73,27 +73,37 @@ jobs:
|
||||
regex: false
|
||||
include: GodotHelper/GodotHelper.csproj
|
||||
|
||||
- name: 📦 Build
|
||||
- name: Build
|
||||
working-directory: GodotHelper
|
||||
run: dotnet build -c Release
|
||||
|
||||
- name: 🔎 Get Package Path
|
||||
- name: Get Package Path
|
||||
id: package-path
|
||||
run: |
|
||||
package=$(find ./GodotHelper/nupkg -name "*.nupkg")
|
||||
echo "package=$package" >> "$GITHUB_OUTPUT"
|
||||
echo "📦 Found package: $package"
|
||||
echo "Found package: $package"
|
||||
echo "${{ steps.package-path.outputs.package }}"
|
||||
|
||||
- name: ✨ Create Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_BASIC }}
|
||||
- name: Create Release
|
||||
run: |
|
||||
version="${{ steps.next-version.outputs.version }}"
|
||||
gh release create --title "v$version" --generate-notes "$version" \
|
||||
"${{ steps.package-path.outputs.package }}"
|
||||
|
||||
- name: 🛜 Publish to Nuget
|
||||
curl -X POST "http://192.168.1.4:3000/api/packages/Ronnie/GodotHelpers/releases" \
|
||||
-H "Authorization: token ${{ secrets.GH_BASIC }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{
|
||||
\"tag_name\": \"$version\",
|
||||
\"name\": \"v$version\",
|
||||
\"body\": \"Auto release $version\"
|
||||
}"
|
||||
- name: Publish to Nuget
|
||||
run: |
|
||||
dotnet nuget push "${{ steps.package-path.outputs.package }}" \
|
||||
--api-key "${{ secrets.NUGET_API_KEY }}" \
|
||||
--source "https://api.nuget.org/v3/index.json" --skip-duplicate
|
||||
--source "http://192.168.1.4:3000/api/packages/Ronnie/nuget/index.json" \
|
||||
--allow-insecure-connections \
|
||||
--api-key "${{ secrets.NUGET_KEY }}" \
|
||||
--skip-duplicate
|
||||
|
||||
|
||||
|
||||
|
||||
8
.github/workflows/spellcheck.yaml
vendored
8
.github/workflows/spellcheck.yaml
vendored
@@ -1,11 +1,11 @@
|
||||
name: '🧑🏫 Spellcheck'
|
||||
name: 'Spellcheck'
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
spellcheck:
|
||||
name: '🧑🏫 Spellcheck'
|
||||
name: 'Spellcheck'
|
||||
# Only run the workflow if it's not a PR or if it's a PR from a fork.
|
||||
# This prevents duplicate workflows from running on PR's that originate
|
||||
# from the repository itself.
|
||||
@@ -16,10 +16,10 @@ jobs:
|
||||
working-directory: '.'
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
name: 🧾 Checkout
|
||||
name: Checkout
|
||||
|
||||
- uses: streetsidesoftware/cspell-action@v8
|
||||
name: 📝 Check Spelling
|
||||
name: Check Spelling
|
||||
with:
|
||||
config: './cspell.json'
|
||||
incremental_files_only: false
|
||||
|
||||
20
.github/workflows/tests.yaml
vendored
20
.github/workflows/tests.yaml
vendored
@@ -1,11 +1,11 @@
|
||||
name: 🚥 Tests
|
||||
name: Tests
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: 🧪 Evaluate Tests on ${{ matrix.os }}
|
||||
name: Evaluate Tests on ${{ matrix.os }}
|
||||
# Only run the workflow if it's not a PR or if it's a PR from a fork.
|
||||
# This prevents duplicate workflows from running on PR's that originate
|
||||
# from the repository itself.
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Put the operating systems you want to run on here.
|
||||
os: [ubuntu-latest, macos-latest, windows-2025]
|
||||
os: [ubuntu-latest]
|
||||
env:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
DOTNET_NOLOGO: true
|
||||
@@ -25,22 +25,22 @@ jobs:
|
||||
# Use bash shells on all platforms.
|
||||
shell: bash
|
||||
steps:
|
||||
- name: 🧾 Checkout
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: true
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: 💽 Setup .NET SDK
|
||||
- name: Setup .NET SDK
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
# Use the .NET SDK from global.json in the root of the repository.
|
||||
global-json-file: global.json
|
||||
|
||||
- name: 📦 Restore Dependencies
|
||||
- name: Restore Dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: 🤖 Setup Godot
|
||||
- name: Setup Godot
|
||||
uses: chickensoft-games/setup-godot@v2
|
||||
with:
|
||||
# Version must include major, minor, and patch, and be >= 4.0.0
|
||||
@@ -52,13 +52,13 @@ jobs:
|
||||
# renovatebot updates the Godot SDK version.
|
||||
version: global.json
|
||||
|
||||
- name: 🧑🔬 Generate .NET Bindings
|
||||
- name: Generate .NET Bindings
|
||||
working-directory: GodotHelper.Tests
|
||||
run: godot --headless --build-solutions --quit || exit 0
|
||||
|
||||
- name: 🦺 Build Projects
|
||||
- name: Build Projects
|
||||
run: dotnet build
|
||||
|
||||
- name: 🧪 Run Tests
|
||||
- name: Run Tests
|
||||
working-directory: GodotHelper.Tests
|
||||
run: godot --headless --run-tests --quit-on-finish
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
namespace GodotHelpers.Raycasts;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Godot;
|
||||
using Godot.Collections;
|
||||
using SJK.Functional;
|
||||
|
||||
namespace GodotHelpers.Raycasts;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Extensions for <see cref="PhysicsDirectSpaceState3D"/>.
|
||||
/// Allows for an static way of casting an godot Raycast3D.
|
||||
/// </summary>
|
||||
public static class RaycastExtensions
|
||||
{
|
||||
// --- 3D ---
|
||||
@@ -45,6 +47,10 @@ public static class RaycastExtensions
|
||||
|
||||
// --- 2D ---
|
||||
|
||||
/// <summary>
|
||||
/// Extensions for <see cref="PhysicsDirectSpaceState2D"/>.
|
||||
/// Allows for an static way of casting an godot Raycast3D.
|
||||
/// </summary>
|
||||
public static RaycastResult2D? RaycastEx(this PhysicsDirectSpaceState2D space, Vector2 from, Vector2 to, uint collisionMask = uint.MaxValue, Rid[]? exclude = null, bool hitFromInside = false)
|
||||
{
|
||||
var query = new PhysicsRayQueryParameters2D
|
||||
|
||||
13
NuGet.Config
Normal file
13
NuGet.Config
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||
<add key="gitea" value="http://192.168.1.4:3000/api/packages/Ronnie/nuget/index.json" allowInsecureConnections="True" />
|
||||
</packageSources>
|
||||
<packageSourceCredentials>
|
||||
<gitea>
|
||||
<add key="Username" value="Ronnie" />
|
||||
<add key="ClearTextPassword" value="e59e39d60f30b539ae594d8cfc7a9771883d2eb0" />
|
||||
</gitea>
|
||||
</packageSourceCredentials>
|
||||
</configuration>
|
||||
@@ -13,6 +13,7 @@
|
||||
"**/nupkg/**/*.*"
|
||||
],
|
||||
"words": [
|
||||
"Aabb",
|
||||
"assemblyfilters",
|
||||
"automerge",
|
||||
"branchcoverage",
|
||||
@@ -28,14 +29,18 @@
|
||||
"endregion",
|
||||
"Finalizer",
|
||||
"Finalizers",
|
||||
"gitea",
|
||||
"globaltool",
|
||||
"godotengine",
|
||||
"godotpackage",
|
||||
"issuecomment",
|
||||
"justalemon",
|
||||
"Kisner",
|
||||
"lcov",
|
||||
"Lerp",
|
||||
"lihop",
|
||||
"linecoverage",
|
||||
"Mathf",
|
||||
"methodcoverage",
|
||||
"missingall",
|
||||
"msbuild",
|
||||
@@ -67,4 +72,4 @@
|
||||
"Unparented",
|
||||
"Xunit"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user