Compare commits
2 Commits
cb518961e7
...
55cc53dad4
| Author | SHA1 | Date | |
|---|---|---|---|
| 55cc53dad4 | |||
| d605edf6bf |
18
.github/workflows/auto_release.yaml
vendored
18
.github/workflows/auto_release.yaml
vendored
@@ -14,10 +14,10 @@
|
|||||||
# You can disable this action by setting the DISABLE_AUTO_RELEASE repository
|
# You can disable this action by setting the DISABLE_AUTO_RELEASE repository
|
||||||
# variable to true.
|
# variable to true.
|
||||||
|
|
||||||
name: '🦾 Auto-Release'
|
name: 'Auto-Release'
|
||||||
on:
|
on:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows: ["🚥 Tests"]
|
workflows: ["Tests"]
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
types:
|
types:
|
||||||
@@ -25,12 +25,12 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
auto_release:
|
auto_release:
|
||||||
name: 🦾 Auto-Release
|
name: Auto-Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
should_release: ${{ steps.release.outputs.should_release }}
|
should_release: ${{ steps.release.outputs.should_release }}
|
||||||
steps:
|
steps:
|
||||||
- name: 🧾 Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
# Use your GitHub Personal Access Token variable here.
|
# Use your GitHub Personal Access Token variable here.
|
||||||
@@ -38,12 +38,12 @@ jobs:
|
|||||||
lfs: true
|
lfs: true
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
|
|
||||||
- name: 🧑🔬 Check Test Results
|
- name: Check Test Results
|
||||||
id: tests
|
id: tests
|
||||||
run: |
|
run: |
|
||||||
echo "passed=${{ github.event.workflow_run.conclusion == 'success' }}" >> "$GITHUB_OUTPUT"
|
echo "passed=${{ github.event.workflow_run.conclusion == 'success' }}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: 📄 Check If Dependencies Changed
|
- name: Check If Dependencies Changed
|
||||||
id: deps
|
id: deps
|
||||||
run: |
|
run: |
|
||||||
message=$(git log -1 --pretty=%B)
|
message=$(git log -1 --pretty=%B)
|
||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
echo "changed=false" >> "$GITHUB_OUTPUT"
|
echo "changed=false" >> "$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: 📝 Check Release Status
|
- name: Check Release Status
|
||||||
id: release
|
id: release
|
||||||
run: |
|
run: |
|
||||||
echo "Tests passed: ${{ steps.tests.outputs.passed }}"
|
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
|
if [[ ${{ steps.tests.outputs.passed }} == "true" && ${{ steps.deps.outputs.changed }} == "true" && $disable_auto_release != "true" ]]; then
|
||||||
echo "should_release=true" >> "$GITHUB_OUTPUT"
|
echo "should_release=true" >> "$GITHUB_OUTPUT"
|
||||||
echo "🦾 Creating a release!"
|
echo "Creating a release!"
|
||||||
else
|
else
|
||||||
echo "should_release=false" >> "$GITHUB_OUTPUT"
|
echo "should_release=false" >> "$GITHUB_OUTPUT"
|
||||||
echo "✋ Not creating a release."
|
echo "Not creating a release."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trigger_release:
|
trigger_release:
|
||||||
|
|||||||
45
.github/workflows/release.yaml
vendored
45
.github/workflows/release.yaml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: '📦 Release'
|
name: 'Release'
|
||||||
on:
|
on:
|
||||||
# Make a release whenever the developer wants.
|
# Make a release whenever the developer wants.
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -26,13 +26,13 @@ on:
|
|||||||
default: "patch"
|
default: "patch"
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: '📦 Release'
|
name: 'Release'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||||
DOTNET_NOLOGO: true
|
DOTNET_NOLOGO: true
|
||||||
steps:
|
steps:
|
||||||
- name: 🧾 Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GH_BASIC }}
|
token: ${{ secrets.GH_BASIC }}
|
||||||
@@ -40,17 +40,17 @@ jobs:
|
|||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
fetch-depth: 0 # So we can get all tags.
|
fetch-depth: 0 # So we can get all tags.
|
||||||
|
|
||||||
- name: 🔎 Read Current Project Version
|
- name: Read Current Project Version
|
||||||
id: current-version
|
id: current-version
|
||||||
uses: WyriHaximus/github-action-get-previous-tag@v2
|
uses: WyriHaximus/github-action-get-previous-tag@v2
|
||||||
with:
|
with:
|
||||||
fallback: "0.0.0-devbuild"
|
fallback: "0.0.0-devbuild"
|
||||||
|
|
||||||
- name: 🖨 Print Current Version
|
- name: Print Current Version
|
||||||
run: |
|
run: |
|
||||||
echo "Current Version: ${{ steps.current-version.outputs.tag }}"
|
echo "Current Version: ${{ steps.current-version.outputs.tag }}"
|
||||||
|
|
||||||
- name: 🧮 Compute Next Version
|
- name: Compute Next Version
|
||||||
uses: chickensoft-games/next-godot-csproj-version@v1
|
uses: chickensoft-games/next-godot-csproj-version@v1
|
||||||
id: next-version
|
id: next-version
|
||||||
with:
|
with:
|
||||||
@@ -59,13 +59,13 @@ jobs:
|
|||||||
bump: ${{ inputs.bump }}
|
bump: ${{ inputs.bump }}
|
||||||
|
|
||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v5
|
||||||
name: 💽 Setup .NET SDK
|
name: Setup .NET SDK
|
||||||
with:
|
with:
|
||||||
# Use the .NET SDK from global.json in the root of the repository.
|
# Use the .NET SDK from global.json in the root of the repository.
|
||||||
global-json-file: global.json
|
global-json-file: global.json
|
||||||
|
|
||||||
# Write version to file so .NET will build correct version.
|
# 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
|
uses: jacobtomlinson/gha-find-replace@v3
|
||||||
with:
|
with:
|
||||||
find: "0.0.0-devbuild"
|
find: "0.0.0-devbuild"
|
||||||
@@ -73,27 +73,30 @@ jobs:
|
|||||||
regex: false
|
regex: false
|
||||||
include: GodotHelper/GodotHelper.csproj
|
include: GodotHelper/GodotHelper.csproj
|
||||||
|
|
||||||
- name: 📦 Build
|
- name: Build
|
||||||
working-directory: GodotHelper
|
working-directory: GodotHelper
|
||||||
run: dotnet build -c Release
|
run: dotnet build -c Release
|
||||||
|
|
||||||
- name: 🔎 Get Package Path
|
- name: Get Package Path
|
||||||
id: package-path
|
id: package-path
|
||||||
run: |
|
run: |
|
||||||
package=$(find ./GodotHelper/nupkg -name "*.nupkg")
|
package=$(find ./GodotHelper/nupkg -name "*.nupkg")
|
||||||
echo "package=$package" >> "$GITHUB_OUTPUT"
|
echo "package=$package" >> "$GITHUB_OUTPUT"
|
||||||
echo "📦 Found package: $package"
|
echo "Found package: $package"
|
||||||
|
|
||||||
- name: ✨ Create Release
|
# - name: Create Release
|
||||||
env:
|
# env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_BASIC }}
|
# GITHUB_TOKEN: ${{ secrets.GH_BASIC }}
|
||||||
run: |
|
# run: |
|
||||||
version="${{ steps.next-version.outputs.version }}"
|
# version="${{ steps.next-version.outputs.version }}"
|
||||||
gh release create --title "v$version" --generate-notes "$version" \
|
# gh release create --title "v$version" --generate-notes "$version" \
|
||||||
"${{ steps.package-path.outputs.package }}"
|
# "${{ steps.package-path.outputs.package }}"
|
||||||
|
|
||||||
- name: 🛜 Publish to Nuget
|
- name: Publish to Nuget
|
||||||
run: |
|
run: |
|
||||||
dotnet nuget push "${{ steps.package-path.outputs.package }}" \
|
dotnet nuget push "${{ steps.package-path.outputs.package }}" \
|
||||||
--api-key "${{ secrets.NUGET_API_KEY }}" \
|
--source "http://192.168.1.4:3000/api/packages/Ronnie/nuget/index.json" \
|
||||||
--source "https://api.nuget.org/v3/index.json" --skip-duplicate
|
--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:
|
on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
spellcheck:
|
spellcheck:
|
||||||
name: '🧑🏫 Spellcheck'
|
name: 'Spellcheck'
|
||||||
# Only run the workflow if it's not a PR or if it's a PR from a fork.
|
# 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
|
# This prevents duplicate workflows from running on PR's that originate
|
||||||
# from the repository itself.
|
# from the repository itself.
|
||||||
@@ -16,10 +16,10 @@ jobs:
|
|||||||
working-directory: '.'
|
working-directory: '.'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
name: 🧾 Checkout
|
name: Checkout
|
||||||
|
|
||||||
- uses: streetsidesoftware/cspell-action@v8
|
- uses: streetsidesoftware/cspell-action@v8
|
||||||
name: 📝 Check Spelling
|
name: Check Spelling
|
||||||
with:
|
with:
|
||||||
config: './cspell.json'
|
config: './cspell.json'
|
||||||
incremental_files_only: false
|
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:
|
on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
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.
|
# 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
|
# This prevents duplicate workflows from running on PR's that originate
|
||||||
# from the repository itself.
|
# from the repository itself.
|
||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# Put the operating systems you want to run on here.
|
# Put the operating systems you want to run on here.
|
||||||
os: [ubuntu-latest, macos-latest, windows-2025]
|
os: [ubuntu-latest]
|
||||||
env:
|
env:
|
||||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||||
DOTNET_NOLOGO: true
|
DOTNET_NOLOGO: true
|
||||||
@@ -25,22 +25,22 @@ jobs:
|
|||||||
# Use bash shells on all platforms.
|
# Use bash shells on all platforms.
|
||||||
shell: bash
|
shell: bash
|
||||||
steps:
|
steps:
|
||||||
- name: 🧾 Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
lfs: true
|
lfs: true
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
|
|
||||||
- name: 💽 Setup .NET SDK
|
- name: Setup .NET SDK
|
||||||
uses: actions/setup-dotnet@v5
|
uses: actions/setup-dotnet@v5
|
||||||
with:
|
with:
|
||||||
# Use the .NET SDK from global.json in the root of the repository.
|
# Use the .NET SDK from global.json in the root of the repository.
|
||||||
global-json-file: global.json
|
global-json-file: global.json
|
||||||
|
|
||||||
- name: 📦 Restore Dependencies
|
- name: Restore Dependencies
|
||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
|
|
||||||
- name: 🤖 Setup Godot
|
- name: Setup Godot
|
||||||
uses: chickensoft-games/setup-godot@v2
|
uses: chickensoft-games/setup-godot@v2
|
||||||
with:
|
with:
|
||||||
# Version must include major, minor, and patch, and be >= 4.0.0
|
# Version must include major, minor, and patch, and be >= 4.0.0
|
||||||
@@ -52,13 +52,13 @@ jobs:
|
|||||||
# renovatebot updates the Godot SDK version.
|
# renovatebot updates the Godot SDK version.
|
||||||
version: global.json
|
version: global.json
|
||||||
|
|
||||||
- name: 🧑🔬 Generate .NET Bindings
|
- name: Generate .NET Bindings
|
||||||
working-directory: GodotHelper.Tests
|
working-directory: GodotHelper.Tests
|
||||||
run: godot --headless --build-solutions --quit || exit 0
|
run: godot --headless --build-solutions --quit || exit 0
|
||||||
|
|
||||||
- name: 🦺 Build Projects
|
- name: Build Projects
|
||||||
run: dotnet build
|
run: dotnet build
|
||||||
|
|
||||||
- name: 🧪 Run Tests
|
- name: Run Tests
|
||||||
working-directory: GodotHelper.Tests
|
working-directory: GodotHelper.Tests
|
||||||
run: godot --headless --run-tests --quit-on-finish
|
run: godot --headless --run-tests --quit-on-finish
|
||||||
|
|||||||
Reference in New Issue
Block a user