Skip to content

Commit

Permalink
Merge pull request #282 from SpaceWarpDev/dev
Browse files Browse the repository at this point in the history
SpaceWarp 1.8
  • Loading branch information
jan-bures authored Jan 12, 2024
2 parents 8d619dc + 50aed07 commit 54d500e
Show file tree
Hide file tree
Showing 257 changed files with 13,114 additions and 2,178 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build_spacewarp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ jobs:
run: |
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
- name: Running automated tests
run: |
dotnet test "SpaceWarp.sln"
test_exit_code=$?
if [ $test_exit_code -ne 0 ]; then
echo "Tests failed. Cancelling the build."
exit $test_exit_code
fi
- name: Build the solution
run: dotnet build "SpaceWarp.sln" -c Release

Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/release_nuget.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Publish NuGet Package
env:
MOD_ID: 3277
KSP2_ID: 22407

on:
release:
Expand All @@ -7,7 +10,7 @@ on:
jobs:
publish:
runs-on: ubuntu-latest

permissions: write-all
steps:
- name: Check out repository
uses: actions/checkout@v3
Expand All @@ -32,6 +35,7 @@ jobs:
echo "artifact_name=spacewarp-release-$version.zip" >> $GITHUB_ENV
echo "zip=$(ls -1 dist/SpaceWarp-*.zip | head -n 1)" >> $GITHUB_ENV
echo "upload_url=$(wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq '.[0].upload_url' | tr -d \")" >> $GITHUB_ENV
wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq -r '.[0].body' > ./changelog.md
- name: Check if version exists
id: check-version
Expand All @@ -41,7 +45,6 @@ jobs:
exists=$(echo "$response" | jq -r --arg id "SpaceWarp" --arg version "$version" '.data[] | select(.id == $id) | .versions[] | select(.version == $version) | .version')
if [ "$exists" == "$version" ]; then
echo "Version $version already exists in the NuGet repository"
exit 1
else
echo "Version $version does not exist in the NuGet repository"
echo "should_publish=true" >> $GITHUB_ENV
Expand All @@ -62,4 +65,17 @@ jobs:
asset_path: ${{ env.zip }}
asset_name: ${{ env.artifact_name }}
asset_content_type: application/zip

- name: Add Mask
run: echo "::add-mask::${{ secrets.SPACEDOCK_PASSWORD }}"

- name: Update spacedock
uses: KSP2Community/[email protected]
with:
username: ${{ secrets.SPACEDOCK_USER }}
password: ${{ secrets.SPACEDOCK_PASSWORD }}
game_id: 22407
mod_id: 3277
version: ${{ env.version }}
zipball: ${{ env.zip }}
changelog: ./changelog.md
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ StyleCopReport.xml
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
Expand Down
11 changes: 7 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
<ModulesObjPath>$(SolutionDir)build/obj/modules/$(Configuration)</ModulesObjPath>
<PatcherBinPath>$(SolutionDir)build/bin/patcher/$(Configuration)</PatcherBinPath>
<PatcherObjPath>$(SolutionDir)build/obj/patcher/$(Configuration)</PatcherObjPath>
<RestarterBinPath>$(SolutionDir)build/bin/restarter/$(Configuration)</RestarterBinPath>
<RestarterObjPath>$(SolutionDir)build/obj/restarter/$(Configuration)</RestarterObjPath>
<RestarterDistPath>$(SolutionDir)dist/$(Configuration)/BepInEx/plugins/SpaceWarp/restarter</RestarterDistPath>
<BaseOutputPath>$(ModulesBinPath)/$(MSBuildProjectName)</BaseOutputPath>
<BaseIntermediateOutputPath>$(ModulesObjPath)/$(MSBuildProjectName)</BaseIntermediateOutputPath>
<AssemblyName>$(MSBuildProjectName)</AssemblyName>
Expand Down Expand Up @@ -56,9 +59,9 @@
<Description>@(Swinfo -> '%(description)')</Description>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>@(Swinfo -> '%(source)')</RepositoryUrl>
<BepInExPluginGuid>$(ModId)</BepInExPluginGuid>
<BepInExPluginName>$(Product)</BepInExPluginName>
<BepInExPluginVersion>$(Version)</BepInExPluginVersion>
<SpaceWarpPluginGuid>$(ModId)</SpaceWarpPluginGuid>
<SpaceWarpPluginName>$(Product)</SpaceWarpPluginName>
<SpaceWarpPluginVersion>$(Version)</SpaceWarpPluginVersion>
</PropertyGroup>
</Target>
</Project>
</Project>
22 changes: 21 additions & 1 deletion SpaceWarp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpaceWarp.Game", "src/Space
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpaceWarp.Messaging", "src/SpaceWarp.Messaging/SpaceWarp.Messaging.csproj", "{66BA4E01-8521-42EB-9D7D-8EB653757177}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpaceWarpRestarter", "src\SpaceWarpRestarter\SpaceWarpRestarter.csproj", "{4B509D31-4C02-4D6E-8508-8417F0745776}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpaceWarp.Sound", "src/SpaceWarp.Sound/SpaceWarp.Sound.csproj", "{BA439A24-7EA3-4E79-A44C-1FA303B9331C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpaceWarp.UI", "src/SpaceWarp.UI/SpaceWarp.UI.csproj", "{CB131B63-51E6-4ED7-A47C-28B1EB65B8D7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpaceWarp.VersionChecking", "src/SpaceWarp.VersionChecking/SpaceWarp.VersionChecking.csproj", "{6B76C415-5BC2-4AB0-8862-760D9DC8F485}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpaceWarpPatcher", "src/SpaceWarpPatcher/SpaceWarpPatcher.csproj", "{2EF642D0-F66D-461C-A5B0-953E39307B76}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpaceWarp.Preload", "src\SpaceWarp.Preload\SpaceWarp.Preload.csproj", "{2EF642D0-F66D-461C-A5B0-953E39307B76}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpaceWarpTest", "src/SpaceWarpTest/SpaceWarpTest.csproj", "{8DB42693-9177-40B9-AC6A-B6D7A4823FAD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpaceWarp.Patches", "src\SpaceWarp.Patches\SpaceWarp.Patches.csproj", "{88F73A97-3D47-4ED3-8381-177EED4451AC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -98,6 +102,22 @@ Global
{8DB42693-9177-40B9-AC6A-B6D7A4823FAD}.Deploy|Any CPU.Build.0 = Deploy|Any CPU
{8DB42693-9177-40B9-AC6A-B6D7A4823FAD}.DeployAndRun|Any CPU.ActiveCfg = DeployAndRun|Any CPU
{8DB42693-9177-40B9-AC6A-B6D7A4823FAD}.DeployAndRun|Any CPU.Build.0 = DeployAndRun|Any CPU
{4B509D31-4C02-4D6E-8508-8417F0745776}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B509D31-4C02-4D6E-8508-8417F0745776}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B509D31-4C02-4D6E-8508-8417F0745776}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B509D31-4C02-4D6E-8508-8417F0745776}.Release|Any CPU.Build.0 = Release|Any CPU
{4B509D31-4C02-4D6E-8508-8417F0745776}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU
{4B509D31-4C02-4D6E-8508-8417F0745776}.Deploy|Any CPU.Build.0 = Deploy|Any CPU
{4B509D31-4C02-4D6E-8508-8417F0745776}.DeployAndRun|Any CPU.ActiveCfg = DeployAndRun|Any CPU
{4B509D31-4C02-4D6E-8508-8417F0745776}.DeployAndRun|Any CPU.Build.0 = DeployAndRun|Any CPU
{88F73A97-3D47-4ED3-8381-177EED4451AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88F73A97-3D47-4ED3-8381-177EED4451AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88F73A97-3D47-4ED3-8381-177EED4451AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88F73A97-3D47-4ED3-8381-177EED4451AC}.Release|Any CPU.Build.0 = Release|Any CPU
{88F73A97-3D47-4ED3-8381-177EED4451AC}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU
{88F73A97-3D47-4ED3-8381-177EED4451AC}.Deploy|Any CPU.Build.0 = Deploy|Any CPU
{88F73A97-3D47-4ED3-8381-177EED4451AC}.DeployAndRun|Any CPU.ActiveCfg = DeployAndRun|Any CPU
{88F73A97-3D47-4ED3-8381-177EED4451AC}.DeployAndRun|Any CPU.Build.0 = DeployAndRun|Any CPU
EndGlobalSection
EndGlobal

Binary file not shown.

This file was deleted.

Loading

0 comments on commit 54d500e

Please sign in to comment.