Nuget package information and workflow

This commit is contained in:
Luke 2022-09-10 09:07:13 +10:00
parent 945417411b
commit f87fa90e65
3 changed files with 59 additions and 4 deletions

30
.github/workflows/ci-otapi3-nuget.yml vendored Normal file
View file

@ -0,0 +1,30 @@
name: Deploy NuGet(OTAPI3)
on:
push:
branches: [ nuget-release ]
pull_request:
branches: [ nuget-release ]
jobs:
build:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.400
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build TShock.sln --configuration Release --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release
# Publish
- name: Push TShockAPI
run: dotnet nuget push TShockAPI/bin/Release/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json

View file

@ -4,6 +4,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 17.0.31825.309
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{755F5B05-0924-47E9-9563-26EB20FE3F67}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
appveyor.yml = appveyor.yml
CHANGELOG.md = CHANGELOG.md
.github\workflows\ci-otapi3-nuget.yml = .github\workflows\ci-otapi3-nuget.yml
.github\workflows\ci-otapi3.yml = .github\workflows\ci-otapi3.yml
COPYING = COPYING
.github\workflows\danger.yml = .github\workflows\danger.yml
README.md = README.md
README_cn.md = README_cn.md
SECURITY.md = SECURITY.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TShockAPI", "TShockAPI\TShockAPI.csproj", "{49606449-072B-4CF5-8088-AA49DA586694}"
EndProject

View file

@ -6,8 +6,6 @@
<TargetFramework>net6.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<!--
Version information for an assembly consists of the following four values:
@ -20,11 +18,16 @@
Also, be sure to release on github with the exact assembly version tag as below
so that the update manager works correctly (via the Github releases api and mimic)
-->
<Version>5.0.0-beta</Version>
<Version>5.0.0-beta</Version>
<AssemblyTitle>TShock for Terraria</AssemblyTitle>
<Company>Pryaxis &amp; TShock Contributors</Company>
<Product>TShockAPI</Product>
<Copyright>Copyright © Pryaxis &amp; TShock Contributors 2011-2021</Copyright>
<Copyright>Copyright © Pryaxis &amp; TShock Contributors 2011-2022</Copyright>
<!-- extras for nuget -->
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<Authors>Pryaxis &amp; TShock Contributors</Authors>
<Description>TShock is a toolbox for Terraria servers and communities.</Description>
</PropertyGroup>
<ItemGroup>
@ -43,4 +46,13 @@
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="..\prebuilts\HttpServer.dll">
<Link>HttpServer.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
<Pack>true</Pack>
</None>
</ItemGroup>
</Project>