Skip to content

Commit d847702

Browse files
authored
Pubhlish to nuget (#484)
* Pubhlish to nuget * Fixed lines * Packing again
1 parent f098827 commit d847702

File tree

8 files changed

+10
-15
lines changed

8 files changed

+10
-15
lines changed

.github/workflows/main.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,9 @@ jobs:
200200
--api-key ${{ secrets.GITHUB_TOKEN }}
201201
202202
# Only publish to NuGet on stable releases
203-
# Repeat the run for these inputs: Fido2, Fido2.Models, Fido2.Aspnet
204-
- name: Publish package to NuGet Registry
203+
- name: Publish packages (NuGet Registry)
205204
if: ${{ github.event_name == 'release' }}
206-
run: |
207-
dotnet nuget push **/Fido2.nupkg --source "https://api.nuget.org/v3/index.json" --api-key "${{ secrets.nuget_api_key }}"
208-
dotnet nuget push **/Fido2.Models.nupkg --source "https://api.nuget.org/v3/index.json" --api-key "${{ secrets.nuget_api_key }}"
209-
dotnet nuget push **/Fido2.AspNet.nupkg --source "https://api.nuget.org/v3/index.json" --api-key "${{ secrets.nuget_api_key }}"
205+
run: >
206+
dotnet nuget push **/*.nupkg
207+
--source https://api.nuget.org/v3/index.json
208+
--api-key ${{ secrets.nuget_api_key }}

Directory.Build.props

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<PropertyGroup>
3030
<!-- Avoid annoying build warnings when packing using the solution file -->
3131
<IsPackable>false</IsPackable>
32+
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
3233
<!-- Avoid annoying build warnings when packing using the solution file -->
3334
<IsTestProject>false</IsTestProject>
3435
</PropertyGroup>

Src/Directory.Build.props

+1-7
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,5 @@
99
</PropertyGroup>
1010
<ItemGroup Condition="$(IS_DOCKER) == ''">
1111
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
12-
</ItemGroup>
13-
14-
<!-- Projects inside "./src" should generate packages -->
15-
<PropertyGroup>
16-
<IsPackable>true</IsPackable>
17-
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
18-
</PropertyGroup>
12+
</ItemGroup>
1913
</Project>

Src/Fido2.AspNet/Fido2.AspNet.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<TargetFrameworks>$(SupportedTargetFrameworks)</TargetFrameworks>
55
<RootNamespace>Fido2NetLib</RootNamespace>
6+
<IsPackable>true</IsPackable>
67
</PropertyGroup>
78

89
<ItemGroup>

Src/Fido2.Models/Fido2.Models.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
<IsTrimmable>true</IsTrimmable>
88
<NoWarn>$(NoWarn);CS1591</NoWarn>
9+
<IsPackable>true</IsPackable>
910
</PropertyGroup>
1011

1112
</Project>

Src/Fido2/Fido2.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<ImplicitUsings>disable</ImplicitUsings>
88
<IsTrimmable>true</IsTrimmable>
99
<NoWarn>$(NoWarn);IDE0057</NoWarn>
10+
<IsPackable>true</IsPackable>
1011
</PropertyGroup>
1112

1213
<ItemGroup>

Test/Test.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>$(SupportedTargetFrameworks)</TargetFrameworks>
5-
<IsPackable>false</IsPackable>
65
<NoWarn>$(NoWarm);CA1822;IDE0007;IDE0037;IDE0039;IDE0057;CA1825</NoWarn>
76
</PropertyGroup>
87

Tests/Fido2.Ctap2.Tests/Fido2.Ctap2.Tests.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<PropertyGroup>
44
<TargetFrameworks>$(SupportedTargetFrameworks)</TargetFrameworks>
55
<Nullable>enable</Nullable>
6-
<IsPackable>false</IsPackable>
76
</PropertyGroup>
87

98
<ItemGroup>

0 commit comments

Comments
 (0)