diff --git a/.github/workflows/BuildSolutions.yml b/.github/workflows/BuildSolutions.yml new file mode 100644 index 0000000..daee2ca --- /dev/null +++ b/.github/workflows/BuildSolutions.yml @@ -0,0 +1,81 @@ +name: Build Solutions + +permissions: + contents: write + +on: + push: + branches: [main] + +jobs: + build-timeserved: + name: Build TimeServed + runs-on: windows-latest + if: github.actor != 'github-actions[bot]' + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '6.0.x' + + - name: Restore + run: dotnet restore TimeServed.sln + + - name: Build + run: | + dotnet build TimeServed.sln ` + --configuration Release ` + --no-restore ` + --output build-output/TimeServed + + build-level-editor: + name: Build LevelEditor + needs: build-timeserved + runs-on: windows-latest + if: github.actor != 'github-actions[bot]' + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - name: Restore + run: dotnet restore LevelEditor/LevelEditor.sln + + - name: Build + run: | + dotnet build LevelEditor/LevelEditor.sln ` + --configuration Release ` + --no-restore ` + --output build-output/LevelEditor + + - name: Commit build outputs to builds branch + shell: pwsh + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + # Create or reset builds branch + git checkout -B builds + + git add build-output/TimeServed + git add build-output/LevelEditor + + if (git diff --cached --quiet) { + Write-Host "No changes to commit" + } else { + git commit -m "Build outputs (CI)" + git push origin builds + } diff --git a/.gitignore b/.gitignore index 0825812..ba360e1 100644 --- a/.gitignore +++ b/.gitignore @@ -401,3 +401,6 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml + + +build-output/ \ No newline at end of file diff --git a/LevelEditor/LevelEditor.csproj b/LevelEditor/LevelEditor.csproj index 8c52363..0333740 100644 --- a/LevelEditor/LevelEditor.csproj +++ b/LevelEditor/LevelEditor.csproj @@ -5,8 +5,10 @@ net8.0-windows enable true + true + enable - true + true @@ -32,8 +34,8 @@ Always - Always - + Always + Component diff --git a/MakeEveryDayRecount.csproj b/MakeEveryDayRecount.csproj deleted file mode 100644 index dffb424..0000000 --- a/MakeEveryDayRecount.csproj +++ /dev/null @@ -1,38 +0,0 @@ - - - WinExe - net6.0 - Major - false - false - - - app.manifest - Icon.ico - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/MakeEveryDayRecount.sln b/MakeEveryDayRecount.sln deleted file mode 100644 index b7d2566..0000000 --- a/MakeEveryDayRecount.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.12.35521.163 d17.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MakeEveryDayRecount", "MakeEveryDayRecount.csproj", "{DBD0979D-A156-4B50-AEBA-8559A07B0F0B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DBD0979D-A156-4B50-AEBA-8559A07B0F0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DBD0979D-A156-4B50-AEBA-8559A07B0F0B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DBD0979D-A156-4B50-AEBA-8559A07B0F0B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DBD0979D-A156-4B50-AEBA-8559A07B0F0B}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/TimeServed.csproj b/TimeServed.csproj index dffb424..3d6ea63 100644 --- a/TimeServed.csproj +++ b/TimeServed.csproj @@ -5,6 +5,8 @@ Major false false + true + app.manifest