Jean-David Moisan преди 4 години
родител
ревизия
e9d807918a
променени са 3 файла, в които са добавени 26 реда и са изтрити 7 реда
  1. 5 5
      .github/workflows/release.yml
  2. 21 1
      Source/Apos.Input.csproj
  3. 0 1
      VERSION

+ 5 - 5
.github/workflows/release.yml

@@ -2,8 +2,8 @@ name: Release to NuGet
 
 on:
   push:
-    paths:
-    - 'VERSION'
+    tags:
+    - 'v*'
 
 jobs:
   build:
@@ -15,8 +15,8 @@ jobs:
     - name: Setup .NET Core
       uses: actions/setup-dotnet@v1
       with:
-        dotnet-version: 3.1.101
+        dotnet-version: '3.1.x'
     - name: Pack with dotnet
-      run: dotnet pack Source --output nuget-packages --configuration Release
+      run: dotnet pack Source -c Release --include-source --include-symbols -o ./artifacts
     - name: Push with dotnet
-      run: dotnet nuget push nuget-packages/*.nupkg --api-key ${{ secrets.NuGetAPIKey }} --source https://api.nuget.org/v3/index.json
+      run: dotnet nuget push ./artifacts/Apos.Input.*.nupkg -k ${{ secrets.NuGetAPIKey }} -s https://api.nuget.org/v3/index.json --skip-duplicate

+ 21 - 1
Source/Apos.Input.csproj

@@ -1,4 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
+
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
     <PackageId>Apos.Input</PackageId>
@@ -16,11 +17,30 @@
     <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
     <RepositoryType>git</RepositoryType>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
+    <PublishRepositoryUrl>true</PublishRepositoryUrl>
+    <EmbedUntrackedSources>true</EmbedUntrackedSources>
+    <IncludeSymbols>true</IncludeSymbols>
+    <SymbolPackageFormat>snupkg</SymbolPackageFormat>
   </PropertyGroup>
+
   <ItemGroup>
     <PackageReference Include="MonoGame.Framework.DesktopGL.Core" PrivateAssets="All" Version="3.7.0.7" />
   </ItemGroup>
+
   <ItemGroup>
     <None Include="../Images/Icon.png" Pack="true" PackagePath="" />
   </ItemGroup>
-</Project>
+
+  <ItemGroup>
+    <SourceRoot Include="$(MSBuildThisFileDirectory)/"/>
+    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
+      <PrivateAssets>all</PrivateAssets>
+      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
+    </PackageReference>
+  </ItemGroup>
+
+  <PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
+    <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
+  </PropertyGroup>
+
+</Project>

+ 0 - 1
VERSION

@@ -1 +0,0 @@
-1.0.0