-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Normalize EOL for all files that Git considers text files. | ||
* text=auto eol=lf | ||
|
||
# Image formats | ||
*.bmp filter=lfs diff=lfs merge=lfs -text | ||
*.dds filter=lfs diff=lfs merge=lfs -text | ||
*.exr filter=lfs diff=lfs merge=lfs -text | ||
*.hdr filter=lfs diff=lfs merge=lfs -text | ||
*.jpg filter=lfs diff=lfs merge=lfs -text | ||
*.jpeg filter=lfs diff=lfs merge=lfs -text | ||
*.png filter=lfs diff=lfs merge=lfs -text | ||
*.tga filter=lfs diff=lfs merge=lfs -text | ||
*.svg filter=lfs diff=lfs merge=lfs -text | ||
*.webp filter=lfs diff=lfs merge=lfs -text | ||
|
||
# Audio and Video formats | ||
*.mp3 filter=lfs diff=lfs merge=lfs -text | ||
*.wav filter=lfs diff=lfs merge=lfs -text | ||
*.ogg filter=lfs diff=lfs merge=lfs -text | ||
*.ogx filter=lfs diff=lfs merge=lfs -text | ||
*.ogv filter=lfs diff=lfs merge=lfs -text | ||
|
||
# 3D formats | ||
*.gltf filter=lfs diff=lfs merge=lfs -text | ||
*.blend filter=lfs diff=lfs merge=lfs -text | ||
*.blend1 filter=lfs diff=lfs merge=lfs -text | ||
*.glb filter=lfs diff=lfs merge=lfs -text | ||
*.dae filter=lfs diff=lfs merge=lfs -text | ||
*.obj filter=lfs diff=lfs merge=lfs -text | ||
*.fbx filter=lfs diff=lfs merge=lfs -text | ||
|
||
# Build | ||
*.dll filter=lfs diff=lfs merge=lfs -text | ||
*.exe filter=lfs diff=lfs merge=lfs -text | ||
*.pdb filter=lfs diff=lfs merge=lfs -text | ||
*.so filter=lfs diff=lfs merge=lfs -text | ||
*.dylib filter=lfs diff=lfs merge=lfs -text | ||
|
||
# Packaging | ||
*.zip filter=lfs diff=lfs merge=lfs -text | ||
*.7z filter=lfs diff=lfs merge=lfs -text | ||
*.gz filter=lfs diff=lfs merge=lfs -text | ||
*.rar filter=lfs diff=lfs merge=lfs -text | ||
*.tar filter=lfs diff=lfs merge=lfs -text | ||
*.file filter=lfs diff=lfs merge=lfs -text | ||
*.dylib filter=lfs diff=lfs merge=lfs -text |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# This workflow will run whenever tests finish running. If tests pass, it will | ||
# look at the last commit message to see if it contains the phrase | ||
# "chore(deps): update all dependencies". | ||
# | ||
# If it finds a commit with that phrase, and the testing workflow has passed, | ||
# it will automatically release a new version of the project by running the | ||
# publish workflow. | ||
# | ||
# The commit message phrase above is always used by renovatebot when opening | ||
# PR's to update dependencies. If you have renovatebot enabled and set to | ||
# automatically merge in dependency updates, this can automatically release and | ||
# publish the updated version of the project. | ||
# | ||
# You can disable this action by setting the DISABLE_AUTO_RELEASE repository | ||
# variable to true. | ||
|
||
name: '🦾 Auto-Release' | ||
on: | ||
workflow_run: | ||
workflows: ["🚥 Tests"] | ||
branches: | ||
- main | ||
types: | ||
- completed | ||
|
||
jobs: | ||
auto_release: | ||
name: 🦾 Auto-Release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
should_release: ${{ steps.release.outputs.should_release }} | ||
steps: | ||
- name: 🧾 Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Use your GitHub Personal Access Token variable here. | ||
token: ${{ secrets.GH_BASIC }} | ||
lfs: true | ||
submodules: 'recursive' | ||
|
||
- name: 🧑🔬 Check Test Results | ||
id: tests | ||
run: | | ||
echo "passed=${{ github.event.workflow_run.conclusion == 'success' }}" >> "$GITHUB_OUTPUT" | ||
- name: 📄 Check If Dependencies Changed | ||
id: deps | ||
run: | | ||
message=$(git log -1 --pretty=%B) | ||
if [[ $message == *"chore(deps)"* ]]; then | ||
echo "changed=true" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "changed=false" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: 📝 Check Release Status | ||
id: release | ||
run: | | ||
echo "Tests passed: ${{ steps.tests.outputs.passed }}" | ||
echo "Dependencies changed: ${{ steps.deps.outputs.changed }}" | ||
disable_auto_release='${{ vars.DISABLE_AUTO_RELEASE }}' | ||
echo "DISABLE_AUTO_RELEASE=$disable_auto_release" | ||
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!" | ||
else | ||
echo "should_release=false" >> "$GITHUB_OUTPUT" | ||
echo "✋ Not creating a release." | ||
fi | ||
trigger_release: | ||
uses: './.github/workflows/release.yaml' | ||
needs: auto_release | ||
if: needs.auto_release.outputs.should_release == 'true' | ||
secrets: | ||
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | ||
GH_BASIC: ${{ secrets.GH_BASIC }} | ||
with: | ||
bump: patch |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: '📦 Release' | ||
on: | ||
# Make a release whenever the developer wants. | ||
workflow_dispatch: | ||
inputs: | ||
bump: | ||
type: string | ||
description: "major, minor, or patch" | ||
required: true | ||
default: "patch" | ||
# Make a release whenever we're told to by another workflow. | ||
workflow_call: | ||
secrets: | ||
NUGET_API_KEY: | ||
description: "API key for Nuget" | ||
required: true | ||
GH_BASIC: | ||
description: "Personal access token (PAT) for GitHub" | ||
required: true | ||
# Input unifies with the workflow dispatch since it's identical. | ||
inputs: | ||
bump: | ||
type: string | ||
description: "major, minor, or patch" | ||
required: true | ||
default: "patch" | ||
jobs: | ||
release: | ||
name: '📦 Release' | ||
runs-on: ubuntu-latest | ||
env: | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
DOTNET_NOLOGO: true | ||
steps: | ||
- name: 🧾 Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_BASIC }} | ||
lfs: true | ||
submodules: 'recursive' | ||
fetch-depth: 0 # So we can get all tags. | ||
|
||
- name: 🔎 Read Current Project Version | ||
id: current-version | ||
uses: WyriHaximus/github-action-get-previous-tag@v1 | ||
with: | ||
fallback: "0.0.0-devbuild" | ||
|
||
- name: 🖨 Print Current Version | ||
run: | | ||
echo "Current Version: ${{ steps.current-version.outputs.tag }}" | ||
- name: 🧮 Compute Next Version | ||
uses: chickensoft-games/next-godot-csproj-version@v1 | ||
id: next-version | ||
with: | ||
project-version: ${{ steps.current-version.outputs.tag }} | ||
godot-version: global.json | ||
bump: ${{ inputs.bump }} | ||
|
||
- uses: actions/setup-dotnet@v4 | ||
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 | ||
uses: jacobtomlinson/gha-find-replace@v3 | ||
with: | ||
find: "0.0.0-devbuild" | ||
replace: ${{ steps.next-version.outputs.version }} | ||
regex: false | ||
include: Chickensoft.PalettePainter/Chickensoft.PalettePainter.csproj | ||
|
||
- name: 📦 Build | ||
run: dotnet build \ | ||
Chickensoft.PalettePainter/Chickensoft.PalettePainter.csproj -c Release | ||
|
||
- name: 🔎 Get Package Path | ||
id: package-path | ||
run: | | ||
package=$(find ./Chickensoft.PalettePainter/nupkg -name "*.nupkg") | ||
echo "package=$package" >> "$GITHUB_OUTPUT" | ||
echo "📦 Found package: $package" | ||
- name: ✨ Create Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_BASIC }} | ||
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 | ||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: '🧑🏫 Spellcheck' | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
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. | ||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: '.' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: 🧾 Checkout | ||
|
||
- uses: streetsidesoftware/cspell-action@v6 | ||
name: 📝 Check Spelling | ||
with: | ||
config: './cspell.json' | ||
incremental_files_only: false | ||
root: '.' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
**/coverage/* | ||
!**/coverage/.gdignore | ||
nupkg/ | ||
.godot/ | ||
bin/ | ||
obj/ | ||
.generated/ | ||
.vs/ | ||
.DS_Store | ||
*.DotSettings.user | ||
*.binlog |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Chickensoft.PalettePainter" type="DotNetProject" factoryName=".NET Project"> | ||
<option name="EXE_PATH" value="$PROJECT_DIR$/Chickensoft.PalettePainter/nupkg/net8.0/Chickensoft.PalettePainter" /> | ||
<option name="PROGRAM_PARAMETERS" value="generate palette.png --hue 180 --saturation 1 --brightness 1 --num-ramps 8 --hue-shift 0.5 --hue-spectrum 100 --desaturate 0.3 -x 32" /> | ||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Chickensoft.PalettePainter" /> | ||
<option name="PASS_PARENT_ENVS" value="1" /> | ||
<option name="USE_EXTERNAL_CONSOLE" value="0" /> | ||
<option name="USE_MONO" value="0" /> | ||
<option name="RUNTIME_ARGUMENTS" value="" /> | ||
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Chickensoft.PalettePainter/Chickensoft.PalettePainter.csproj" /> | ||
<option name="PROJECT_EXE_PATH_TRACKING" value="1" /> | ||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" /> | ||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="0" /> | ||
<option name="PROJECT_KIND" value="DotNetCore" /> | ||
<option name="PROJECT_TFM" value="net8.0" /> | ||
<method v="2"> | ||
<option name="Build" /> | ||
</method> | ||
</configuration> | ||
</component> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-dotnettools.csharp", | ||
"selcukermaya.se-csproj-extensions", | ||
"josefpihrt-vscode.roslynator", | ||
"streetsidesoftware.code-spell-checker", | ||
"VisualStudioExptTeam.vscodeintellicode", | ||
"DavidAnson.vscode-markdownlint" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
// For these launch configurations to work, you need to setup a GODOT | ||
// environment variable. On mac or linux, this can be done by adding | ||
// the following to your .zshrc, .bashrc, or .bash_profile file: | ||
// export GODOT="/Applications/Godot.app/Contents/MacOS/Godot" | ||
{ | ||
"name": "🧪 Debug Tests", | ||
"type": "coreclr", | ||
"request": "launch", | ||
"preLaunchTask": "build", | ||
"program": "${env:GODOT}", | ||
"args": [ | ||
// These command line flags are used by GoDotTest to run tests. | ||
"--run-tests", | ||
"--quit-on-finish" | ||
], | ||
"cwd": "${workspaceFolder}/Chickensoft.PalettePainter.Tests", | ||
"stopAtEntry": false, | ||
}, | ||
{ | ||
"name": "🔬 Debug Current Test", | ||
"type": "coreclr", | ||
"request": "launch", | ||
"preLaunchTask": "build", | ||
"program": "${env:GODOT}", | ||
"args": [ | ||
// These command line flags are used by GoDotTest to run tests. | ||
"--run-tests=${fileBasenameNoExtension}", | ||
"--quit-on-finish" | ||
], | ||
"cwd": "${workspaceFolder}/Chickensoft.PalettePainter.Tests", | ||
"stopAtEntry": false, | ||
}, | ||
] | ||
} |