Skip to content

Add version attributes to csproj files #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: bleeding-edge
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/deploy-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ jobs:
run: |
sed -i "s/{VERSION_NUMBER}/${{ steps.semantic-release.outputs.new_release_version }}/" ./S1API/S1API.cs
sed -i "s/{VERSION_NUMBER}/${{ steps.semantic-release.outputs.new_release_version }}/" ./S1APILoader/S1APILoader.cs
sed -i "s/$(Version)/${{ steps.semantic-release.outputs.new_release_version }}/" ./S1API/S1API.csproj
sed -i "s/$(Version)/${{ steps.semantic-release.outputs.new_release_version }}/" ./S1APILoader/S1APILoader.csproj

- name: Run .NET build for MonoBepInEx
run: dotnet build ./S1API.sln -c MonoBepInEx -f netstandard2.1
Expand Down Expand Up @@ -99,7 +101,7 @@ jobs:
libraries

- name: Pack NuGet package
run: dotnet pack ./S1API/S1API.csproj -c MonoMelon --output ./nupkg /p:PackageVersion=${{ steps.semantic-release.outputs.new_release_version }}
run: dotnet pack ./S1API/S1API.csproj -c MonoMelon --output ./nupkg

- name: Push to NuGet Gallery
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
6 changes: 6 additions & 0 deletions S1API.sln
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "S1API", "S1API\S1API.csproj
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "S1APILoader", "S1APILoader\S1APILoader.csproj", "{B97277C2-27FE-4BB9-AB5A-D479C8DF6827}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{C090D161-6958-471A-A97B-DBFB36EE57DA}"
ProjectSection(SolutionItems) = preProject
.github\workflows\deploy-build.yml = .github\workflows\deploy-build.yml
.github\workflows\verify-build.yml = .github\workflows\verify-build.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
MonoBepInEx|Any CPU = MonoBepInEx|Any CPU
Expand Down
3 changes: 2 additions & 1 deletion S1API/S1API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<RootNamespace>S1API</RootNamespace>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>latest</LangVersion>
<Version>$(Version)</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'MonoMelon' or '$(Configuration)' == 'MonoBepInEx'">
Expand Down Expand Up @@ -103,7 +104,7 @@
</ItemGroup>

<!-- Automated local deployment -->
<Target Name="PostBuildIl2CppMelon" AfterTargets="Build" Condition="'$(AutomateLocalDeployment)' == 'true' and '$(Configuration)' == 'Il2CppMono'">
<Target Name="PostBuildIl2CppMelon" AfterTargets="Build" Condition="'$(AutomateLocalDeployment)' == 'true' and '$(Configuration)' == 'Il2CppMelon'">
<Message Text="[IL2CPP/MelonLoader] Deploying S1API to local Il2Cpp plugins folder" Importance="high"/>
<Copy SourceFiles=".\bin\Il2CppMelon\net6.0\S1API.dll" DestinationFiles="$(LocalIl2CppDeploymentPath)\Plugins\S1API\S1API.Il2Cpp.dll"/>
<Copy SourceFiles=".\bin\MonoMelon\netstandard2.1\S1API.dll" DestinationFiles="$(LocalIl2CppDeploymentPath)\Plugins\S1API\S1API.Mono.dll"/>
Expand Down
1 change: 1 addition & 0 deletions S1APILoader/S1APILoader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<Configurations>Il2CppMelon;MonoBepInEx;MonoMelon;Il2CppBepInEx</Configurations>
<Platforms>AnyCPU</Platforms>
<RootNamespace>S1APILoader</RootNamespace>
<Version>$(Version)</Version>
</PropertyGroup>

<ItemGroup>
Expand Down