.NET Format

Implements a commit workflow on every commit that runs `dotnet format` to format the source of the project via the rules configured within the editorConfig. This does nothing to assign any formatting, it just enforces the rules already present.
This commit is contained in:
Refringe
2025-05-03 16:40:18 -04:00
parent c8e3c70df3
commit 15b2a73765
3 changed files with 51 additions and 11 deletions
+37
View File
@@ -0,0 +1,37 @@
name: .NET Format
on:
push:
branches:
- develop
pull_request:
branches: ["*"]
branches-ignore:
- main
jobs:
dotnet-format:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.BYPASS_WORKFLOW_PAT }}
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0
- name: Restore Tool Dependencies
run: dotnet tool install -g csharpier
- name: CSharpier Format
run: csharpier format .
- uses: stefanzweifel/git-auto-commit-action@v6
with:
commit_message: .NET Format Style Fixes
commit_user_name: Format Bot