Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetopia committed Feb 20, 2024
2 parents 4573e2d + 86469b4 commit c84128d
Show file tree
Hide file tree
Showing 101 changed files with 9,159 additions and 1,068 deletions.
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build

on:
push:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true

- name: Build the solution
run: dotnet build "Simpit.sln" -c Release

- name: Find zip
id: find-zip
run: |
echo "zip=$(ls -1 dist/Simpit-*.zip | head -n 1)" >> $GITHUB_ENV
echo "artifact_name=SimpitRelease" >> $GITHUB_ENV
- name: Upload zip artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: ${{ env.zip }}

63 changes: 63 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Upload release

env:
SPACEDOCK_MOD_ID: fill_in_your_mod_id_here

on:
release:
types: [ "published" ]

jobs:
publish:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true

- 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: Install jq
uses: dcarbone/[email protected]

- name: Build the solution
run: dotnet build "Simpit.sln" -c Release

- name: Extract current version
id: get-version
run: |
version=$(jq -r '.version' plugin_template/swinfo.json)
echo "Version is $version"
echo "version=$version" >> $GITHUB_ENV
echo "release_filename=Simpit-$version.zip" >> $GITHUB_ENV
echo "zip=$(ls -1 dist/Simpit-*.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: Upload zip to release
uses: shogo82148/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.upload_url }}
asset_path: ${{ env.zip }}
asset_name: ${{ env.release_filename }}
asset_content_type: application/zip

# - name: Add Mask
# run: echo "::add-mask::${{ secrets.SPACEDOCK_PASSWORD }}"
#
# - name: Update mod on SpaceDock
# uses: KSP2Community/[email protected]
# with:
# username: ${{ secrets.SPACEDOCK_USER }}
# password: ${{ secrets.SPACEDOCK_PASSWORD }}
# game_id: 22407
# mod_id: ${{ env.SPACEDOCK_MOD_ID }}
# version: ${{ env.version }}
# zipball: ${{ env.zip }}
# changelog: ./changelog.md
16 changes: 16 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Verify swinfo.json

on:
push:
branches: [ "main" ]

jobs:
verify:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Verify KSP2 Mod
uses: Rexicon226/[email protected]
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ _UpgradeReport_Files/
/[Pp]ackages/

# Mod template folders
[Bb]uild/
[Dd]ist/
[Nn]uget/
[Ee]xternal_dlls/*
![Ee]xternal_dlls/PUT_EXTERNAL_DLLS_HERE
/[Bb]uild/
/[Dd]ist/
/[Nn]uget/

# Rider

Expand Down
23 changes: 0 additions & 23 deletions Backup/Simpit.sln

This file was deleted.

13 changes: 8 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@

<PropertyGroup Label="Build and namespace configuration">
<SolutionDir Condition="'$(SolutionDir)'==''">$(MSBuildThisFileDirectory)</SolutionDir>
<BaseOutputPath>$(SolutionDir)build/bin/$(MSBuildProjectName)</BaseOutputPath>
<BaseIntermediateOutputPath>$(SolutionDir)build/obj/$(MSBuildProjectName)</BaseIntermediateOutputPath>
<PluginBinPath>$(SolutionDir)build/bin/plugin/$(Configuration)</PluginBinPath>
<PluginObjPath>$(SolutionDir)build/obj/plugin/$(Configuration)</PluginObjPath>
<BaseOutputPath>$(PluginBinPath)/$(MSBuildProjectName)</BaseOutputPath>
<BaseIntermediateOutputPath>$(PluginObjPath)/$(MSBuildProjectName)</BaseIntermediateOutputPath>
<AssemblyName>$(MSBuildProjectName)</AssemblyName>
<RootNamespace>$(AssemblyName)</RootNamespace>
<Configurations>Debug;Release;Deploy;DeployAndRun</Configurations>
Expand Down Expand Up @@ -49,9 +51,10 @@
<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>

42 changes: 23 additions & 19 deletions Simpit.sln
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34330.188
MinimumVisualStudioVersion = 10.0.40219.1
Project("{0D848141-4620-47B2-AF57-02BF768348DB}") = "Simpit", "src\Simpit\Simpit.csproj", "{3CB59FD8-9616-403F-9935-36F40342CDD1}"
Project("{41FFCBB3-78C9-4A4B-B55E-478C960C6418}") = "Simpit", "src/Simpit/Simpit.csproj", "{96243FF1-A7E2-4574-902B-81A3592BFD26}"
EndProject
Project("{41FFCBB3-78C9-4A4B-B55E-478C960C6418}") = "Simpit.Unity", "src/Simpit.Unity/Simpit.Unity.csproj", "{9BED4A08-E72A-4B13-8ED2-63BFB8725C54}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Deploy|Any CPU = Deploy|Any CPU
DeployAndRun|Any CPU = DeployAndRun|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3CB59FD8-9616-403F-9935-36F40342CDD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3CB59FD8-9616-403F-9935-36F40342CDD1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3CB59FD8-9616-403F-9935-36F40342CDD1}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU
{3CB59FD8-9616-403F-9935-36F40342CDD1}.Deploy|Any CPU.Build.0 = Deploy|Any CPU
{3CB59FD8-9616-403F-9935-36F40342CDD1}.DeployAndRun|Any CPU.ActiveCfg = DeployAndRun|Any CPU
{3CB59FD8-9616-403F-9935-36F40342CDD1}.DeployAndRun|Any CPU.Build.0 = DeployAndRun|Any CPU
{3CB59FD8-9616-403F-9935-36F40342CDD1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3CB59FD8-9616-403F-9935-36F40342CDD1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {48EA8D91-9EFD-4435-B9B4-57D06796183B}
{96243FF1-A7E2-4574-902B-81A3592BFD26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{96243FF1-A7E2-4574-902B-81A3592BFD26}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96243FF1-A7E2-4574-902B-81A3592BFD26}.Release|Any CPU.ActiveCfg = Release|Any CPU
{96243FF1-A7E2-4574-902B-81A3592BFD26}.Release|Any CPU.Build.0 = Release|Any CPU
{96243FF1-A7E2-4574-902B-81A3592BFD26}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU
{96243FF1-A7E2-4574-902B-81A3592BFD26}.Deploy|Any CPU.Build.0 = Deploy|Any CPU
{96243FF1-A7E2-4574-902B-81A3592BFD26}.DeployAndRun|Any CPU.ActiveCfg = DeployAndRun|Any CPU
{96243FF1-A7E2-4574-902B-81A3592BFD26}.DeployAndRun|Any CPU.Build.0 = DeployAndRun|Any CPU
{9BED4A08-E72A-4B13-8ED2-63BFB8725C54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9BED4A08-E72A-4B13-8ED2-63BFB8725C54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9BED4A08-E72A-4B13-8ED2-63BFB8725C54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9BED4A08-E72A-4B13-8ED2-63BFB8725C54}.Release|Any CPU.Build.0 = Release|Any CPU
{9BED4A08-E72A-4B13-8ED2-63BFB8725C54}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU
{9BED4A08-E72A-4B13-8ED2-63BFB8725C54}.Deploy|Any CPU.Build.0 = Deploy|Any CPU
{9BED4A08-E72A-4B13-8ED2-63BFB8725C54}.DeployAndRun|Any CPU.ActiveCfg = DeployAndRun|Any CPU
{9BED4A08-E72A-4B13-8ED2-63BFB8725C54}.DeployAndRun|Any CPU.Build.0 = DeployAndRun|Any CPU
EndGlobalSection
EndGlobal


Loading

0 comments on commit c84128d

Please sign in to comment.