Skip to content

Commit e264a05

Browse files
committed
updates
1 parent 94195cd commit e264a05

File tree

5 files changed

+65
-22
lines changed

5 files changed

+65
-22
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
2.1.x
3030
3131
- name: Build Package
32-
run: dotnet pack --output nupkgs --include-source --include-symbols --configuration Release
32+
run: dotnet pack --output nupkgs /p:ContinuousIntegrationBuild=true --configuration Release
3333

3434
- name: Publish Package
3535
run: dotnet nuget push nupkgs/*.nupkg --source $NUGET_SOURCE_URL --api-key $GITHUB_TOKEN

buildtools/build.proj

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<Exec Command="dotnet restore $(SOLUTION_NAME)" WorkingDirectory=".." />
3636
</Target>
3737

38-
<Target Name="build-nuget-packages" DependsOnTargets="init">
38+
<Target Name="build-nuget-packages" DependsOnTargets="init" Description="Build NuGet packages">
3939
<Exec
4040
Command="dotnet build $(SOLUTION_NAME) /t:Rebuild /p:Configuration=$(Configuration) /p:AssemblyOriginatorKeyFile=$(AssemblyOriginatorKeyFile) /p:SignAssembly=$(SignAssembly)"
4141
WorkingDirectory=".." />
@@ -58,11 +58,4 @@
5858
StdOutEncoding="utf-8" />
5959
</Target>
6060

61-
<Target Name="publish-nuget-github" DependsOnTargets="build-nuget-packages">
62-
<Exec
63-
Command="dotnet nuget push &quot;$(MSBuildThisFileDirectory)../Deployment/nuget-packages/*.nupkg&quot; --source &quot;github&quot; --skip-duplicate"
64-
WorkingDirectory="$(MSBuildProjectDirectory)"
65-
StdOutEncoding="utf-8" />
66-
</Target>
67-
6861
</Project>

doc/source/installation/_index.rst

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,60 @@ Installation
77

88
The latest state of the module can be installed directly from the GitHub repository.
99

10-
TBD.
10+
Install library from GitHub NuGet feed
11+
--------------------------------------
12+
13+
.. note::
14+
15+
For details see: `GitHub Documentation <https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry>`_
16+
17+
18+
To authenticate to GitHub Packages with the dotnet command-line interface
19+
(CLI), create a nuget.config file in your project directory specifying
20+
GitHub Packages as a source under packageSources for the dotnet CLI client.
21+
22+
You must replace:
23+
24+
* USERNAME with the name of your personal account on GitHub.
25+
* TOKEN with your personal access token (classic).
26+
27+
.. code-block:: xml
28+
:caption: NuGet.Config
29+
30+
<?xml version="1.0" encoding="utf-8"?>
31+
<configuration>
32+
<packageSources>
33+
<clear />
34+
<add key="github" value="https://nuget.pkg.github.com/opentelekomcloud-community/index.json" />
35+
</packageSources>
36+
<packageSourceCredentials>
37+
<github>
38+
<add key="Username" value="USERNAME" />
39+
<add key="ClearTextPassword" value="TOKEN" />
40+
</github>
41+
</packageSourceCredentials>
42+
</configuration>
43+
44+
45+
Add or update package reference in the project file using the .NET CLI:
46+
47+
.. code-block:: shell
48+
:caption: dotnet add package
49+
50+
dotnet add package OpenTelekomCloud.API.Signing.Core --version 0.0.0-alpha.0
51+
52+
Alternative add the package reference to your project file:
53+
54+
.. code-block:: xml
55+
:caption: YOUR_PROJECT.csproj
56+
57+
<project Sdk="Microsoft.NET.Sdk">
58+
59+
<ItemGroup>
60+
<PackageReference Include="OpenTelekomCloud.API.Signing.Core" Version="*-*" />
61+
</ItemGroup>
62+
63+
</project>
1164
1265
1366
Install dotnet on Ubuntu

otc-api-sign-sdk-core/otc-api-sign-sdk-core.csproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<ItemGroup>
4+
<!-- https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/sourcelink -->
45
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
56
</ItemGroup>
67

@@ -10,6 +11,10 @@
1011

1112
<!-- Embed source files that are not tracked by the source control manager in the PDB -->
1213
<EmbedUntrackedSources>true</EmbedUntrackedSources>
14+
15+
<DebugType>embedded</DebugType>
16+
<GitRepositoryRemoteName>github</GitRepositoryRemoteName>
17+
1318
</PropertyGroup>
1419

1520
<ItemGroup>
@@ -92,9 +97,6 @@
9297

9398
<IncludeSource>true</IncludeSource>
9499

95-
<IncludeSymbols>true</IncludeSymbols>
96-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
97-
98100
</PropertyGroup>
99101

100102
<ItemGroup>

samples-doc/NuGet.Config

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33

4-
<Settings>
5-
<add key="protocolVersion" value="2" />
6-
</Settings>
7-
<!--
8-
<solution>
9-
<add key="disableSourceControlIntegration" value="true" />
10-
</solution> -->
4+
<Settings>
5+
<add key="protocolVersion" value="2" />
6+
</Settings>
117

128
<packageSources>
139

@@ -23,11 +19,10 @@
2319

2420
<packageSourceCredentials>
2521
<github>
26-
<!-- <add key="Username" value="api-key" /> -->
2722
<add key="Username" value="%GITHUB_USERNAME%" />
2823
<add key="ClearTextPassword" value="%GITHUB_TOKEN%" />
2924
</github>
3025
</packageSourceCredentials>
31-
26+
3227

3328
</configuration>

0 commit comments

Comments
 (0)