# Maintenance notes:
# - change dotnet-version to 8.0.x once tML updates (keep doing this so long as tML updates .NET),
# - if/when we un-ignore the .csproj, get rid of creating one in this script.
name: .NET Linter
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: |
touch CalamityMod.csproj
echo '
CalamityMod
net6.0
AnyCPU
latest
' > CalamityMod.csproj
dotnet restore
- name: Pull TML
run: |
cd ..
mkdir ./tmod
touch tModLoader.targets
echo '
' > tModLoader.targets
cd ./tmod
wget https://github.com/tModLoader/tModLoader/releases/latest/download/tModLoader.zip
unzip tModLoader.zip
cd ..
cd ./CalamityMod
- name: Lint
run: |
dotnet format style CalamityMod.csproj --verify-no-changes