-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #275 from SpaceWarpDev/dev
1.7.0
- Loading branch information
Showing
217 changed files
with
761 additions
and
735 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Publish NuGet Package | ||
|
||
on: | ||
release: | ||
types: [ "published" ] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install jq | ||
uses: dcarbone/[email protected] | ||
|
||
- name: Download NuGet | ||
id: download-nuget | ||
run: | | ||
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe | ||
- name: Build the solution | ||
run: dotnet build "SpaceWarp.sln" -c Release | ||
|
||
- name: Extract current version | ||
id: get-version | ||
run: | | ||
version=$(jq -r '.version' plugin_template/BepInEx/plugins/SpaceWarp/swinfo.json) | ||
echo "Version is $version" | ||
echo "::set-output name=version::$version" | ||
- name: Check if version exists | ||
id: check-version | ||
run: | | ||
version=${{ steps.get-version.outputs.version }} | ||
response=$(curl -s "https://nuget.spacewarp.org/v3/search?q=SpaceWarp") | ||
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 "::set-output name=should_publish::true" | ||
fi | ||
- name: Publish NuGet package | ||
if: steps.check-version.outputs.should_publish == 'true' | ||
run: | | ||
nupkg_path=$(ls -1 nuget/SpaceWarp.*.nupkg | head -n 1) | ||
dotnet nuget push "$nupkg_path" -s https://nuget.spacewarp.org/v3/index.json -k ${{ secrets.NUGET_SERVER_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,64 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project> | ||
<PropertyGroup> | ||
<SpaceWarpVersion>1.6.0</SpaceWarpVersion> | ||
<PropertyGroup Label="Framework and language configuration"> | ||
<TargetFramework>netstandard2.1</TargetFramework> | ||
<RootNamespace>SpaceWarp</RootNamespace> | ||
<LangVersion>11</LangVersion> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies> | ||
<!-- Disabled warning for publicizer attribute until the NuGet exists for KSP2, | ||
and for missing documentation comments for public types and members --> | ||
<NoWarn>$(NoWarn),CS0436,CS1591</NoWarn> | ||
<LangVersion>latest</LangVersion> | ||
<ImplicitUsings>true</ImplicitUsings> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
</PropertyGroup> | ||
|
||
<!-- | ||
Allows use of some newer C# language features that have compiler gates normally. | ||
Do not modify the included types without checking that they don't require runtime support that doesn't exist. | ||
--> | ||
<PropertyGroup Label="Game folder configuration"> | ||
<!-- Set this to the path to your KSP 2 folder if you don't have the KSP2DIR environmental variable set --> | ||
<KSP2DIR Condition="'$(KSP2DIR)' == ''">C:/Program Files (x86)/Steam/steamapps/common/Kerbal Space Program 2</KSP2DIR> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="PolySharp" Version="1.12.1" PrivateAssets="all"/> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<PolySharpIncludeGeneratedTypes> | ||
System.Index; | ||
System.Range; | ||
System.Diagnostics.CodeAnalysis.NotNullWhenAttribute; | ||
System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute; | ||
</PolySharpIncludeGeneratedTypes> | ||
<PropertyGroup Label="Build and namespace configuration"> | ||
<SolutionDir Condition="'$(SolutionDir)'==''">$(MSBuildThisFileDirectory)</SolutionDir> | ||
<PluginBinPath>$(SolutionDir)build/bin/plugin/$(Configuration)</PluginBinPath> | ||
<PluginObjPath>$(SolutionDir)build/obj/plugin/$(Configuration)</PluginObjPath> | ||
<ModulesBinPath>$(SolutionDir)build/bin/modules/$(Configuration)</ModulesBinPath> | ||
<ModulesObjPath>$(SolutionDir)build/obj/modules/$(Configuration)</ModulesObjPath> | ||
<PatcherBinPath>$(SolutionDir)build/bin/patcher/$(Configuration)</PatcherBinPath> | ||
<PatcherObjPath>$(SolutionDir)build/obj/patcher/$(Configuration)</PatcherObjPath> | ||
<BaseOutputPath>$(ModulesBinPath)/$(MSBuildProjectName)</BaseOutputPath> | ||
<BaseIntermediateOutputPath>$(ModulesObjPath)/$(MSBuildProjectName)</BaseIntermediateOutputPath> | ||
<AssemblyName>$(MSBuildProjectName)</AssemblyName> | ||
<RootNamespace>$(AssemblyName)</RootNamespace> | ||
<Configurations>Debug;Release;Deploy;DeployAndRun</Configurations> | ||
<Platforms>AnyCPU</Platforms> | ||
<NoWarn>$(NoWarn);CS0436</NoWarn> | ||
</PropertyGroup> | ||
|
||
<!-- <ItemGroup Label="Dependencies for build targets">--> | ||
<!-- <PackageReference Include="JsonPeek" Version="1.2.0" PrivateAssets="all"/>--> | ||
<!-- </ItemGroup>--> | ||
<PropertyGroup Label="Package source configuration"> | ||
<RestoreAdditionalProjectSources> | ||
https://nuget.spacewarp.org/v3/index.json | ||
</RestoreAdditionalProjectSources> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Label="Dependencies for build targets"> | ||
<PackageReference Include="JsonPeek" Version="1.2.0" PrivateAssets="all"/> | ||
</ItemGroup> | ||
|
||
<!-- <!– Define the main target –>--> | ||
<!-- <Target Label="Reading properties from swinfo.json" Name="ReadPropertiesFromJson" BeforeTargets="PreBuildEvent">--> | ||
<!-- <JsonPeek ContentPath="$(SolutionDir)/SpaceWarpBuildTemplate/swinfo.json" Query="$">--> | ||
<!-- <Output TaskParameter="Result" ItemName="Swinfo"/>--> | ||
<!-- </JsonPeek>--> | ||
<!-- <JsonPeek ContentPath="$(SolutionDir)/SpaceWarpBuildTemplate/swinfo.json" Query="$.dependencies">--> | ||
<!-- <Output TaskParameter="Result" ItemName="Dependencies"/>--> | ||
<!-- </JsonPeek>--> | ||
<!-- Define the main target --> | ||
<Target Label="Reading properties from swinfo.json" Name="ReadPropertiesFromJson" BeforeTargets="PreBuildEvent;AddGeneratedFile"> | ||
<JsonPeek ContentPath="$(SolutionDir)/plugin_template/BepInEx/plugins/SpaceWarp/swinfo.json" Query="$"> | ||
<Output TaskParameter="Result" ItemName="Swinfo"/> | ||
</JsonPeek> | ||
|
||
<!-- <!– Extract properties from the JSON –>--> | ||
<!-- <PropertyGroup>--> | ||
<!-- <SpaceWarpVersion>@(Swinfo -> '%(version)')</SpaceWarpVersion>--> | ||
<!-- </PropertyGroup>--> | ||
<!-- </Target>--> | ||
<!-- Extract properties from the JSON --> | ||
<PropertyGroup> | ||
<ModId>@(Swinfo -> '%(mod_id)')</ModId> | ||
<Version>@(Swinfo -> '%(version)')</Version> | ||
<Version Condition="$(Version.Contains('-'))">$(Version.Substring(0, $(Version.IndexOf('-'))))</Version> | ||
<Product>@(Swinfo -> '%(name)')</Product> | ||
<Authors>@(Swinfo -> '%(author)')</Authors> | ||
<Description>@(Swinfo -> '%(description)')</Description> | ||
<RepositoryType>git</RepositoryType> | ||
<RepositoryUrl>@(Swinfo -> '%(source)')</RepositoryUrl> | ||
<BepInExPluginGuid>$(ModId)</BepInExPluginGuid> | ||
<BepInExPluginName>$(Product)</BepInExPluginName> | ||
<BepInExPluginVersion>$(Version)</BepInExPluginVersion> | ||
</PropertyGroup> | ||
</Target> | ||
</Project> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd"> | ||
<metadata> | ||
<id>SpaceWarp</id> | ||
<version>1.6.0</version> | ||
<authors>SpaceWarp contributors</authors> | ||
<id>$id$</id> | ||
<version>$version$</version> | ||
<authors>$authors$</authors> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<licenseUrl>https://raw.githubusercontent.com/SpaceWarp/SpaceWarp/main/LICENSE</licenseUrl> | ||
<description>A C# modding API for KSP2</description> | ||
<tags>spacewarp ksp2 modding</tags> | ||
<icon>icon.png</icon> | ||
<licenseUrl>https://raw.githubusercontent.com/SpaceWarpDev/SpaceWarp/main/LICENSE</licenseUrl> | ||
<description>$description$</description> | ||
<tags>ksp2 mod library api spacewarp</tags> | ||
<projectUrl>https://spacewarp.org</projectUrl> | ||
<repository type="git" url="https://github.com/SpaceWarpDev/SpaceWarp" /> | ||
<repository type="$repositoryType$" url="$repositoryUrl$" /> | ||
<readme>README.md</readme> | ||
<icon>icon.png</icon> | ||
<dependencies> | ||
<group targetFramework=".NETStandard2.1" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src=".github\README.md" target="README.md" /> | ||
<file src="images\icon.png" target="icon.png" /> | ||
<file src="LICENSE" target="LICENSE" /> | ||
<file src="build\nuget_temp\*.dll" target="lib/netstandard2.1/" /> | ||
<file src="build\nuget_temp\*.xml" target="lib/netstandard2.1/" /> | ||
<file src="images\icon.png" target="icon.png" /> | ||
<file src="temp_nuget\*.dll" target="lib/netstandard2.1/" /> | ||
<file src="temp_nuget\*.xml" target="lib/netstandard2.1/" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Space Warp | ||
Space Warp is an API for KSP 2 mod developers. |
Oops, something went wrong.