Преглед изворни кода

housekeeping: Add Nuget package info

Bruce Wayne пре 4 година
родитељ
комит
19befab3fd
3 измењених фајлова са 36 додато и 3 уклоњено
  1. 25 0
      .github/workflows/nuget.yml
  2. 0 3
      STUN/FodyWeavers.xml
  3. 11 0
      STUN/STUN.csproj

+ 25 - 0
.github/workflows/nuget.yml

@@ -0,0 +1,25 @@
+name: Nuget
+on: [push, pull_request]
+
+jobs:
+  build:
+    name: Build
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        ProjectName: [ STUN ]
+
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v2
+
+    - name: Build
+      shell: pwsh
+      run: dotnet build -c Release ${{ matrix.ProjectName }}\${{ matrix.ProjectName }}.csproj
+
+    - name: Push nuget packages
+      if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+      shell: pwsh
+      run: |
+        dotnet nuget push ${{ matrix.ProjectName }}\bin\Release\*.nupkg -s https://nuget.pkg.github.com/HMBSbige -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
+        dotnet nuget push ${{ matrix.ProjectName }}\bin\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NuGetAPIKey }} --skip-duplicate

+ 0 - 3
STUN/FodyWeavers.xml

@@ -1,3 +0,0 @@
-<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
-  <ReactiveUI />
-</Weavers>

+ 11 - 0
STUN/STUN.csproj

@@ -4,6 +4,17 @@
     <TargetFramework>netstandard2.0</TargetFramework>
     <LangVersion>latest</LangVersion>
     <Nullable>enable</Nullable>
+    <NoWarn>CS1591</NoWarn>
+    <GenerateDocumentationFile>true</GenerateDocumentationFile>
+    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
+    <Authors>HMBSbige</Authors>
+    <Copyright>Copyright © 2018 - 2021 HMBSbige</Copyright>
+    <PackageLicenseExpression>MIT</PackageLicenseExpression>
+    <PackageProjectUrl>https://github.com/HMBSbige/NatTypeTester</PackageProjectUrl>
+    <RepositoryUrl>https://github.com/HMBSbige/NatTypeTester</RepositoryUrl>
+    <PackageTags>stun;nat;rfc3489;rfc5389</PackageTags>
+    <Version>1.0.0</Version>
+    <PackageId>Stun.Net</PackageId>
   </PropertyGroup>
 
 </Project>