Skip to content

Commit

Permalink
Merge pull request #8 from SpaceWarpDev/dev
Browse files Browse the repository at this point in the history
Version 1.9.0.1
  • Loading branch information
jan-bures authored Mar 7, 2024
2 parents 1888aae + 41d337e commit 02dc810
Show file tree
Hide file tree
Showing 22 changed files with 181 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish template release
name: Build template

on:
push
Expand Down
2 changes: 1 addition & 1 deletion Package.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>SpaceWarp.Template</id>
<version>1.8.0.6</version>
<version>1.9.0.1</version>
<authors>munix</authors>
<title>SpaceWarp Mod Template</title>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
Expand Down
12 changes: 8 additions & 4 deletions replacements.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ SpaceWarpTemplateName=

SpaceWarpSpecVersion=2.0

SpaceWarpMinVersion=1.8.0
SpaceWarpNugetVersion=1.8.0
SpaceWarpMinVersion=1.9.0
SpaceWarpNugetVersion=1.9.0

KspMinVersion=0.2.0
KspNugetVersion=0.2.0
KspMinVersion=0.2.1
KspNugetVersion=0.2.1

UitkForKsp2MinVersion=2.4.2
UitkForKsp2NugetVersion=2.4.0
UitkForKsp2UnityCommit=182e6c631c63b37d7f1ac3b760b93bb859891436
44 changes: 43 additions & 1 deletion src/common/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Upload release

env:
SPACEDOCK_MOD_ID: fill_in_your_mod_id_here
SPACEDOCK_MOD_URL: "https://spacedock.info/mod/..." # The URL of your mod on SpaceDock"
FORUM_TOPIC_URL: "https://forum.kerbalspaceprogram.com/topic/..." # The URL of your mod's forum topic
FORUM_TOPIC_TITLE: "My Mod [v{version} for KSP2 v{ksp2_version}]" # The title of your mod's forum topic
DISCORD_MOD_THREAD_ID: "1234..." # The thread ID of the mod's Discord post
DISCORD_USERNAME: "My Mod" # The username of the bot that will post to Discord
DISCORD_AVATAR_URL: ".." # The Image URL of the bot's avatar. Not required.

on:
release:
Expand Down Expand Up @@ -60,4 +66,40 @@ jobs:
# mod_id: ${{ env.SPACEDOCK_MOD_ID }}
# version: ${{ env.version }}
# zipball: ${{ env.zip }}
# changelog: ./changelog.md
# changelog: ./changelog.md


# KSP Forum topic update (both title and new post in the thread)
# You need the secrets "KSP_FORUM_USERNAME" and "KSP_FORUM_PASSWORD" for this to work.
# - name: Update Forum topic
# uses: Kerbalight/ksp2-forum-post-action@latest
# with:
# username: ${{ secrets.KSP_FORUM_USERNAME }}
# password: ${{ secrets.KSP_FORUM_PASSWORD }}
# forum_topic_url: ${{ env.FORUM_TOPIC_URL }}
# forum_topic_title: ${{ env.FORUM_TOPIC_TITLE }}
# spacedock_url: ${{ env.SPACEDOCK_MOD_URL}}
# version: ${{ env.version }}
# changelog: ./changelog.md


# Discord update. You need the secret "DISCORD_KMS_WEBHOOK_URL" for this to work. Ask in Discord for this.
# - name: Prepare message for Discord
# shell: bash
# run: |
# echo -e "## Release v${version}\n" > ./content.md
# cat ./changelog.md >> ./content.md
# {
# echo 'discord_message<<EOF'
# cat ./content.md
# echo EOF
# } >> "$GITHUB_ENV"

# - name: Publish update to Discord
# uses: tsickert/[email protected]
# with:
# webhook-url: ${{ secrets.DISCORD_KMS_WEBHOOK_URL }}
# content: ${{ env.discord_message }}
# thread-id: ${{ env.DISCORD_MOD_THREAD_ID }}
# username: ${{ env.DISCORD_USERNAME }}
# avatar-url: ${{ env.DISCORD_AVATAR_URL }}
7 changes: 7 additions & 0 deletions src/common/nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json"/>
<add key="SpaceWarp NuGet repository" value="https://nuget.spacewarp.org/v3/index.json"/>
</packageSources>
</configuration>
1 change: 1 addition & 0 deletions src/templates/SpaceWarpMod/.github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build

on:
push:
pull_request:

jobs:
build:
Expand Down
6 changes: 0 additions & 6 deletions src/templates/SpaceWarpMod/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@
<NoWarn>$(NoWarn);CS0436</NoWarn>
</PropertyGroup>

<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>
Expand Down
File renamed without changes.
10 changes: 9 additions & 1 deletion src/templates/SpaceWarpMod/src/SpaceWarpMod/SpaceWarpMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1" PrivateAssets="all"/>
<PackageReference Include="BepInEx.Core" Version="5.*"/>
<PackageReference Include="HarmonyX" Version="2.10.1"/>
<PackageReference Include="KerbalSpaceProgram2.GameLibs" Version="KspNugetVersion" PrivateAssets="all" Publicize="true"/>
<PackageReference Include="SpaceWarp" Version="SpaceWarpNugetVersion"/>
<PackageReference Include="SpaceWarp.PluginInfoProps" Version="1.*"/>
<PackageReference Include="UnityEngine.Modules" Version="2022.3.5"/>
</ItemGroup>
<!-- Use Assembly-CSharp from the game as a reference locally to enable debugging in Deploy and DeployAndRun -->
<ItemGroup Condition="$(ConfigurationName) != 'Release'">
<Reference Include="Assembly-CSharp">
<HintPath>$(KSP2DIR)\KSP2_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition="$(ConfigurationName) == 'Release'">
<PackageReference Include="KerbalSpaceProgram2.GameLibs" Version="KspNugetVersion" PrivateAssets="all" Publicize="true"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build

on:
push:
pull_request:

jobs:
build:
Expand Down
6 changes: 0 additions & 6 deletions src/templates/SpaceWarpModEmpty/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@
<NoWarn>$(NoWarn);CS0436</NoWarn>
</PropertyGroup>

<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>
Expand Down
23 changes: 23 additions & 0 deletions src/templates/SpaceWarpModEmpty/plugin_template/swinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"spec": "SpaceWarpSpecVersion",
"mod_id": "SpaceWarpTemplateName",
"author": "swinfo_author",
"name": "swinfo_name",
"description": "swinfo_description",
"source": "swinfo_source",
"version": "swinfo_version",
"version_check": "swinfo_checkversion",
"ksp2_version": {
"min": "KspMinVersion",
"max": "*"
},
"dependencies": [
{
"id": "com.github.x606.spacewarp",
"version": {
"min": "SpaceWarpMinVersion",
"max": "*"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1" PrivateAssets="all"/>
<PackageReference Include="BepInEx.Core" Version="5.*"/>
<PackageReference Include="HarmonyX" Version="2.10.1"/>
<PackageReference Include="KerbalSpaceProgram2.GameLibs" Version="KspNugetVersion" PrivateAssets="all" Publicize="true"/>
<PackageReference Include="SpaceWarp" Version="SpaceWarpNugetVersion"/>
<PackageReference Include="SpaceWarp.PluginInfoProps" Version="1.*"/>
<PackageReference Include="UnityEngine.Modules" Version="2022.3.5"/>
</ItemGroup>
<!-- Use Assembly-CSharp from the game as a reference locally to enable debugging in Deploy and DeployAndRun -->
<ItemGroup Condition="$(ConfigurationName) != 'Release'">
<Reference Include="Assembly-CSharp">
<HintPath>$(KSP2DIR)\KSP2_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition="$(ConfigurationName) == 'Release'">
<PackageReference Include="KerbalSpaceProgram2.GameLibs" Version="KspNugetVersion" PrivateAssets="all" Publicize="true"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build

on:
push:
pull_request:

jobs:
build:
Expand Down
6 changes: 0 additions & 6 deletions src/templates/SpaceWarpModLibrary/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
<NoWarn>$(NoWarn);CS0436</NoWarn>
</PropertyGroup>

<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>
Expand Down
23 changes: 23 additions & 0 deletions src/templates/SpaceWarpModLibrary/plugin_template/swinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"spec": "SpaceWarpSpecVersion",
"mod_id": "SpaceWarpTemplateName",
"author": "swinfo_author",
"name": "swinfo_name",
"description": "swinfo_description",
"source": "swinfo_source",
"version": "swinfo_version",
"version_check": "swinfo_checkversion",
"ksp2_version": {
"min": "KspMinVersion",
"max": "*"
},
"dependencies": [
{
"id": "com.github.x606.spacewarp",
"version": {
"min": "SpaceWarpMinVersion",
"max": "*"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1" PrivateAssets="all"/>
<PackageReference Include="BepInEx.Core" Version="5.*"/>
<PackageReference Include="HarmonyX" Version="2.10.1"/>
<PackageReference Include="KerbalSpaceProgram2.GameLibs" Version="KspNugetVersion" PrivateAssets="all" Publicize="true"/>
<PackageReference Include="SpaceWarp" Version="SpaceWarpNugetVersion"/>
<PackageReference Include="SpaceWarp.PluginInfoProps" Version="1.*"/>
<PackageReference Include="UnityEngine.Modules" Version="2022.3.5"/>
Expand All @@ -20,4 +19,13 @@
<ProjectReference Include="$(SolutionDir)/src/SpaceWarpModLibrary.AnotherModule/SpaceWarpModLibrary.AnotherModule.csproj" Private="false"/>
<ProjectReference Include="$(SolutionDir)/src/SpaceWarpModLibrary.PreloadPatcher/SpaceWarpModLibrary.PreloadPatcher.csproj" Private="false"/>
</ItemGroup>
<!-- Use Assembly-CSharp from the game as a reference locally to enable debugging in Deploy and DeployAndRun -->
<ItemGroup Condition="$(ConfigurationName) != 'Release'">
<Reference Include="Assembly-CSharp">
<HintPath>$(KSP2DIR)\KSP2_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition="$(ConfigurationName) == 'Release'">
<PackageReference Include="KerbalSpaceProgram2.GameLibs" Version="KspNugetVersion" PrivateAssets="all" Publicize="true"/>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions src/templates/SpaceWarpModUI/.github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build

on:
push:
pull_request:

jobs:
build:
Expand Down
8 changes: 1 addition & 7 deletions src/templates/SpaceWarpModUI/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@
<NoWarn>$(NoWarn);CS0436</NoWarn>
</PropertyGroup>

<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>
Expand All @@ -56,4 +50,4 @@
<SpaceWarpPluginVersion>$(Version)</SpaceWarpPluginVersion>
</PropertyGroup>
</Target>
</Project>
</Project>
30 changes: 30 additions & 0 deletions src/templates/SpaceWarpModUI/plugin_template/swinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"spec": "SpaceWarpSpecVersion",
"mod_id": "SpaceWarpTemplateName",
"author": "swinfo_author",
"name": "swinfo_name",
"description": "swinfo_description",
"source": "swinfo_source",
"version": "swinfo_version",
"version_check": "swinfo_checkversion",
"ksp2_version": {
"min": "KspMinVersion",
"max": "*"
},
"dependencies": [
{
"id": "com.github.x606.spacewarp",
"version": {
"min": "SpaceWarpMinVersion",
"max": "*"
}
},
{
"id": "UitkForKsp2",
"version": {
"min": "UitkForKsp2MinVersion",
"max": "*"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"depth": 0,
"source": "git",
"dependencies": {},
"hash": "182e6c631c63b37d7f1ac3b760b93bb859891436"
"hash": "UitkForKsp2UnityCommit"
},
"com.unity.modules.ai": {
"version": "1.0.0",
Expand Down Expand Up @@ -339,4 +339,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1" PrivateAssets="all"/>
<PackageReference Include="BepInEx.Core" Version="5.*"/>
<PackageReference Include="HarmonyX" Version="2.10.1"/>
<PackageReference Include="KerbalSpaceProgram2.GameLibs" Version="KspNugetVersion" PrivateAssets="all" Publicize="true"/>
<PackageReference Include="SpaceWarp" Version="SpaceWarpNugetVersion"/>
<PackageReference Include="SpaceWarp.PluginInfoProps" Version="1.*"/>
<PackageReference Include="UitkForKsp2" Version="2.4.0"/>
<PackageReference Include="UitkForKsp2" Version="UitkForKsp2NugetVersion"/>
<PackageReference Include="UnityEngine.Modules" Version="2022.3.5"/>
</ItemGroup>
<ItemGroup Label="Project references">
<!-- Add references to any other projects in your solution that you want to use in your mod here -->
<ProjectReference Include="..\SpaceWarpModUI.Unity\SpaceWarpModUI.Unity.csproj" Private="false"/>
</ItemGroup>
</Project>
<!-- Use Assembly-CSharp from the game as a reference locally to enable debugging in Deploy and DeployAndRun -->
<ItemGroup Condition="$(ConfigurationName) != 'Release'">
<Reference Include="Assembly-CSharp">
<HintPath>$(KSP2DIR)\KSP2_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition="$(ConfigurationName) == 'Release'">
<PackageReference Include="KerbalSpaceProgram2.GameLibs" Version="KspNugetVersion" PrivateAssets="all" Publicize="true"/>
</ItemGroup>
</Project>

0 comments on commit 02dc810

Please sign in to comment.