Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-bures committed Mar 7, 2024
2 parents b748806 + 45d1431 commit e7391d0
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 5 deletions.
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 }}
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 @@ -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 @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,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="UitkForKsp2" Version="UitkForKsp2NugetVersion"/>
Expand All @@ -17,4 +16,13 @@
<!-- 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>
<!-- 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 e7391d0

Please sign in to comment.