Skip to content

Commit 4473ad9

Browse files
authored
Merge pull request #201
Rework of docfx docs building-process
2 parents 47cfb79 + f18a78c commit 4473ad9

File tree

224 files changed

+190
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+190
-222
lines changed

.github/workflows/build-pull-requests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@ jobs:
5656
run: dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Yubico/index.json"
5757

5858
- name: Build Yubico.NET.SDK.sln
59-
run: dotnet build --configuration ReleaseWithDocs --nologo --verbosity minimal Yubico.NET.SDK.sln
59+
run: dotnet build --configuration Release --nologo --verbosity minimal Yubico.NET.SDK.sln
6060

6161
- name: Save build artifacts
6262
uses: actions/upload-artifact@v4
6363
with:
64-
name: Nuget Packages ReleaseWithDocs
64+
name: Nuget Packages Release
6565
path: |
66-
Yubico.Core/src/bin/ReleaseWithDocs/*.nupkg
67-
Yubico.YubiKey/src/bin/ReleaseWithDocs/*.nupkg
66+
Yubico.Core/src/bin/Release/*.nupkg
67+
Yubico.YubiKey/src/bin/Release/*.nupkg
6868
6969
- name: Save build artifacts
7070
uses: actions/upload-artifact@v4
7171
with:
72-
name: Assemblies ReleaseWithDocs
72+
name: Assemblies Release
7373
path: |
74-
Yubico.Core/src/bin/ReleaseWithDocs/**/*.dll
75-
Yubico.YubiKey/src/bin/ReleaseWithDocs/**/*.dll
74+
Yubico.Core/src/bin/Release/**/*.dll
75+
Yubico.YubiKey/src/bin/Release/**/*.dll

.github/workflows/build.yml

Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ on:
4343
schedule:
4444
- cron: '0 0 * * *' # Every day at midnight
4545

46-
47-
4846
jobs:
4947
run-tests:
5048
name: Run tests
@@ -86,67 +84,71 @@ jobs:
8684
8785
# Build the project
8886
- name: Build Yubico.NET.SDK.sln
89-
run: dotnet build --configuration ReleaseWithDocs --nologo --verbosity minimal Yubico.NET.SDK.sln
87+
run: dotnet pack --configuration Release --nologo --verbosity minimal Yubico.NET.SDK.sln
9088

91-
# Upload artifacts
92-
- name: Save documentation artifacts
89+
# Build the documentation
90+
- name: Build docs
91+
run: |
92+
dotnet tool install --global docfx --version "2.*"
93+
docfx docfx.json --logLevel warning --log docfx.log --warningsAsErrors
94+
95+
# Upload documentation log
96+
- name: "Save build artifacts: Docs log"
9397
uses: actions/upload-artifact@v4
9498
with:
95-
name: Documentation
96-
path: Yubico.YubiKey/docs/_site/
99+
name: Documentation log
100+
path: docfx.log
101+
if-no-files-found: error
97102

98-
- name: Save build artifacts
103+
# Upload documentation
104+
- name: "Save build artifacts: Docs"
105+
uses: actions/upload-artifact@v4
106+
with:
107+
name: Documentation
108+
path: docs/_site/
109+
if-no-files-found: error
110+
111+
# Upload NuGet packages
112+
- name: "Save build artifacts: Nuget Packages"
99113
uses: actions/upload-artifact@v4
100114
with:
101115
name: Nuget Packages
102116
path: |
103-
Yubico.Core/src/bin/ReleaseWithDocs/*.nupkg
104-
Yubico.YubiKey/src/bin/ReleaseWithDocs/*.nupkg
117+
Yubico.Core/src/bin/Release/*.nupkg
118+
Yubico.YubiKey/src/bin/Release/*.nupkg
119+
if-no-files-found: error
105120

106-
- name: Save build artifacts
121+
# Upload symbols
122+
- name: "Save build artifacts: Symbols Packages"
107123
uses: actions/upload-artifact@v4
108124
with:
109125
name: Symbols Packages
110126
path: |
111-
Yubico.Core/src/bin/ReleaseWithDocs/*.snupkg
112-
Yubico.YubiKey/src/bin/ReleaseWithDocs/*.snupkg
113-
114-
- name: Save build artifacts
127+
Yubico.Core/src/bin/Release/*.snupkg
128+
Yubico.YubiKey/src/bin/Release/*.snupkg
129+
if-no-files-found: error
130+
131+
# Upload assemblies
132+
- name: "Save build artifacts: Assemblies"
115133
uses: actions/upload-artifact@v4
116134
with:
117135
name: Assemblies
118136
path: |
119-
Yubico.Core/src/bin/ReleaseWithDocs/**/*.dll
120-
Yubico.YubiKey/src/bin/ReleaseWithDocs/**/*.dll
121-
137+
Yubico.Core/src/bin/Release/**/*.dll
138+
Yubico.YubiKey/src/bin/Release/**/*.dll
139+
if-no-files-found: error
140+
141+
# Generate artifact attestation
122142
- name: Generate artifact attestation
123143
uses: actions/attest-build-provenance@v2
124144
with:
125145
subject-path: |
126-
Yubico.Core/src/bin/ReleaseWithDocs/*.nupkg
127-
Yubico.YubiKey/src/bin/ReleaseWithDocs/*.nupkg
128-
Yubico.Core/src/bin/ReleaseWithDocs/*.snupkg
129-
Yubico.YubiKey/src/bin/ReleaseWithDocs/*.snupkg
130-
Yubico.Core/src/bin/ReleaseWithDocs/**/*.dll
131-
Yubico.YubiKey/src/bin/ReleaseWithDocs/**/*.dll
132-
133-
# Package the OATH sample code source
134-
- name: Save build artifacts
135-
uses: actions/upload-artifact@v4
136-
with:
137-
name: OATH Sample Code
138-
path: |
139-
Yubico.YubiKey/examples/OathSampleCode
140-
Yubico.YubiKey/examples/SharedSampleCode
141-
142-
# Package the PIV sample code source
143-
- name: Save build artifacts
144-
uses: actions/upload-artifact@v4
145-
with:
146-
name: PIV Sample Code
147-
path: |
148-
Yubico.YubiKey/examples/PivSampleCode
149-
Yubico.YubiKey/examples/SharedSampleCode
146+
Yubico.Core/src/bin/Release/*.nupkg
147+
Yubico.YubiKey/src/bin/Release/*.nupkg
148+
Yubico.Core/src/bin/Release/*.snupkg
149+
Yubico.YubiKey/src/bin/Release/*.snupkg
150+
Yubico.Core/src/bin/Release/**/*.dll
151+
Yubico.YubiKey/src/bin/Release/**/*.dll
150152
151153
upload-docs:
152154
name: Upload docs
@@ -161,7 +163,7 @@ jobs:
161163
name: Publish to internal NuGet
162164
runs-on: windows-2019
163165
needs: build-artifacts
164-
if: ${{ github.event.inputs.push-to-dev }}
166+
if: ${{ github.event.inputs.push-to-dev == 'true' }}
165167
permissions:
166168
contents: read
167169
packages: write

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
run: dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Yubico/index.json"
6969

7070
- name: Build Yubico.NET.SDK.sln
71-
run: dotnet build --configuration Release --nologo --verbosity normal Yubico.NET.SDK.sln
71+
run: dotnet build --configuration Release --nologo --verbosity minimal Yubico.NET.SDK.sln
7272

7373
- name: Perform CodeQL Analysis
7474
uses: github/codeql-action/analyze@v3

.github/workflows/upload-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- uses: actions/download-artifact@v4
3939
with:
4040
name: Documentation
41-
path: Yubico.YubiKey/docs/_site/
41+
path: docs/_site/
4242

4343
# Construct the docker image
4444
- name: Docker build

.vscode/tasks.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,23 @@
156156
],
157157
"problemMatcher": "$msCompile",
158158
"group": "test"
159+
},
160+
{
161+
"label": "Build DocFX Documentation",
162+
"type": "shell",
163+
"command": "docfx",
164+
"args": [
165+
"docfx.json",
166+
"--log",
167+
"docfx.log",
168+
"--warningsAsErrors"
169+
],
170+
"group": {
171+
"kind": "build",
172+
"isDefault": true
173+
},
174+
"problemMatcher": [],
175+
"detail": "Builds the documentation using DocFX"
159176
}
160177
]
161178
}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ See the License for the specific language governing permissions and
163163
limitations under the License.
164164
```
165165

166-
- See [how-to-install.md](./Yubico.YubiKey/docs/users-manual/getting-started/how-to-install.md) for
166+
- See [how-to-install.md](./docs/users-manual/getting-started/how-to-install.md) for
167167
an example of the header in a markdown file.
168168
- See [YubiKeyDeviceInfo.cs](./Yubico.YubiKey/src/Yubico/YubiKey/YubiKeyDeviceInfo.cs) for an example
169169
of the header in a C# file.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ARG GID=1000
2424
RUN addgroup -g ${GID} -S ynginx \
2525
&& adduser -h /nonexistent -s /bin/false -G ynginx -S -H -u ${UID} ynginx
2626

27-
COPY --chown=0:0 Yubico.YubiKey/docs/_site /usr/share/nginx/www/
27+
COPY --chown=0:0 docs/_site /usr/share/nginx/www/
2828
COPY --chown=0:0 nginx.conf /etc/nginx/nginx.conf
2929

3030
USER ${UID}:${GID}

Yubico.Core/src/Yubico.Core.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ limitations under the License. -->
2525
<!-- Suppressed warnings-->
2626
<!-- NU5104 - We want to allow prerelease NuGet packages -->
2727
<NoWarn>@(NoWarn);NU5104</NoWarn>
28-
<Configurations>Debug;Release;ReleaseWithDocs</Configurations>
28+
<Configurations>Debug;Release</Configurations>
2929

3030
<!-- DocFX will throw a warning (which we set as an error) if it doesn't find a reference assembly. -->
3131
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
@@ -107,7 +107,6 @@ limitations under the License. -->
107107
</Compile>
108108
</ItemGroup>
109109

110-
111110
<ItemGroup>
112111
<PackageReference Include="Microsoft.Bcl.HashCode" Version="6.0.0" />
113112
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0">

Yubico.NET.SDK.sln

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -372,81 +372,56 @@ Global
372372
GlobalSection(SolutionConfigurationPlatforms) = preSolution
373373
Debug|Any CPU = Debug|Any CPU
374374
Release|Any CPU = Release|Any CPU
375-
ReleaseWithDocs|Any CPU = ReleaseWithDocs|Any CPU
376375
EndGlobalSection
377376
GlobalSection(ProjectConfigurationPlatforms) = postSolution
378377
{E7157F16-ACD9-427D-A0D3-568B4EF91E7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
379378
{E7157F16-ACD9-427D-A0D3-568B4EF91E7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
380379
{E7157F16-ACD9-427D-A0D3-568B4EF91E7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
381380
{E7157F16-ACD9-427D-A0D3-568B4EF91E7C}.Release|Any CPU.Build.0 = Release|Any CPU
382-
{E7157F16-ACD9-427D-A0D3-568B4EF91E7C}.ReleaseWithDocs|Any CPU.ActiveCfg = ReleaseWithDocs|Any CPU
383-
{E7157F16-ACD9-427D-A0D3-568B4EF91E7C}.ReleaseWithDocs|Any CPU.Build.0 = ReleaseWithDocs|Any CPU
384381
{C580309E-4712-434A-BAFB-5BF1932860EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
385382
{C580309E-4712-434A-BAFB-5BF1932860EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
386383
{C580309E-4712-434A-BAFB-5BF1932860EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
387384
{C580309E-4712-434A-BAFB-5BF1932860EE}.Release|Any CPU.Build.0 = Release|Any CPU
388-
{C580309E-4712-434A-BAFB-5BF1932860EE}.ReleaseWithDocs|Any CPU.ActiveCfg = Release|Any CPU
389-
{C580309E-4712-434A-BAFB-5BF1932860EE}.ReleaseWithDocs|Any CPU.Build.0 = Release|Any CPU
390385
{0D349F5B-7C87-4A2D-B9E1-D5805F033FB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
391386
{0D349F5B-7C87-4A2D-B9E1-D5805F033FB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
392387
{0D349F5B-7C87-4A2D-B9E1-D5805F033FB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
393388
{0D349F5B-7C87-4A2D-B9E1-D5805F033FB0}.Release|Any CPU.Build.0 = Release|Any CPU
394-
{0D349F5B-7C87-4A2D-B9E1-D5805F033FB0}.ReleaseWithDocs|Any CPU.ActiveCfg = Release|Any CPU
395-
{0D349F5B-7C87-4A2D-B9E1-D5805F033FB0}.ReleaseWithDocs|Any CPU.Build.0 = Release|Any CPU
396389
{4CBA6ABD-C09D-4227-B6B3-58E30C38EACE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
397390
{4CBA6ABD-C09D-4227-B6B3-58E30C38EACE}.Debug|Any CPU.Build.0 = Debug|Any CPU
398391
{4CBA6ABD-C09D-4227-B6B3-58E30C38EACE}.Release|Any CPU.ActiveCfg = Release|Any CPU
399392
{4CBA6ABD-C09D-4227-B6B3-58E30C38EACE}.Release|Any CPU.Build.0 = Release|Any CPU
400-
{4CBA6ABD-C09D-4227-B6B3-58E30C38EACE}.ReleaseWithDocs|Any CPU.ActiveCfg = Release|Any CPU
401-
{4CBA6ABD-C09D-4227-B6B3-58E30C38EACE}.ReleaseWithDocs|Any CPU.Build.0 = Release|Any CPU
402393
{C378DD92-9107-4B7E-9D4B-59271A8ABB42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
403394
{C378DD92-9107-4B7E-9D4B-59271A8ABB42}.Debug|Any CPU.Build.0 = Debug|Any CPU
404395
{C378DD92-9107-4B7E-9D4B-59271A8ABB42}.Release|Any CPU.ActiveCfg = Release|Any CPU
405396
{C378DD92-9107-4B7E-9D4B-59271A8ABB42}.Release|Any CPU.Build.0 = Release|Any CPU
406-
{C378DD92-9107-4B7E-9D4B-59271A8ABB42}.ReleaseWithDocs|Any CPU.ActiveCfg = Release|Any CPU
407-
{C378DD92-9107-4B7E-9D4B-59271A8ABB42}.ReleaseWithDocs|Any CPU.Build.0 = Release|Any CPU
408397
{A69022BB-4582-4373-AAC7-62712923559B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
409398
{A69022BB-4582-4373-AAC7-62712923559B}.Debug|Any CPU.Build.0 = Debug|Any CPU
410399
{A69022BB-4582-4373-AAC7-62712923559B}.Release|Any CPU.ActiveCfg = Release|Any CPU
411400
{A69022BB-4582-4373-AAC7-62712923559B}.Release|Any CPU.Build.0 = Release|Any CPU
412-
{A69022BB-4582-4373-AAC7-62712923559B}.ReleaseWithDocs|Any CPU.ActiveCfg = Release|Any CPU
413-
{A69022BB-4582-4373-AAC7-62712923559B}.ReleaseWithDocs|Any CPU.Build.0 = Release|Any CPU
414401
{B6C9FB57-AF94-4170-AE17-020809E5CED2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
415402
{B6C9FB57-AF94-4170-AE17-020809E5CED2}.Debug|Any CPU.Build.0 = Debug|Any CPU
416403
{B6C9FB57-AF94-4170-AE17-020809E5CED2}.Release|Any CPU.ActiveCfg = Release|Any CPU
417404
{B6C9FB57-AF94-4170-AE17-020809E5CED2}.Release|Any CPU.Build.0 = Release|Any CPU
418-
{B6C9FB57-AF94-4170-AE17-020809E5CED2}.ReleaseWithDocs|Any CPU.ActiveCfg = ReleaseWithDocs|Any CPU
419-
{B6C9FB57-AF94-4170-AE17-020809E5CED2}.ReleaseWithDocs|Any CPU.Build.0 = ReleaseWithDocs|Any CPU
420405
{3546DD14-6205-447E-82FA-1B43A7AE2483}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
421406
{3546DD14-6205-447E-82FA-1B43A7AE2483}.Debug|Any CPU.Build.0 = Debug|Any CPU
422407
{3546DD14-6205-447E-82FA-1B43A7AE2483}.Release|Any CPU.ActiveCfg = Release|Any CPU
423408
{3546DD14-6205-447E-82FA-1B43A7AE2483}.Release|Any CPU.Build.0 = Release|Any CPU
424-
{3546DD14-6205-447E-82FA-1B43A7AE2483}.ReleaseWithDocs|Any CPU.ActiveCfg = Debug|Any CPU
425-
{3546DD14-6205-447E-82FA-1B43A7AE2483}.ReleaseWithDocs|Any CPU.Build.0 = Debug|Any CPU
426409
{0AC0433E-2477-42AE-A003-CE2F2772487B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
427410
{0AC0433E-2477-42AE-A003-CE2F2772487B}.Debug|Any CPU.Build.0 = Debug|Any CPU
428411
{0AC0433E-2477-42AE-A003-CE2F2772487B}.Release|Any CPU.ActiveCfg = Release|Any CPU
429412
{0AC0433E-2477-42AE-A003-CE2F2772487B}.Release|Any CPU.Build.0 = Release|Any CPU
430-
{0AC0433E-2477-42AE-A003-CE2F2772487B}.ReleaseWithDocs|Any CPU.ActiveCfg = Debug|Any CPU
431-
{0AC0433E-2477-42AE-A003-CE2F2772487B}.ReleaseWithDocs|Any CPU.Build.0 = Debug|Any CPU
432413
{396C13D6-0DDA-4B95-BFE9-1ECE3557E6B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
433414
{396C13D6-0DDA-4B95-BFE9-1ECE3557E6B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
434415
{396C13D6-0DDA-4B95-BFE9-1ECE3557E6B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
435416
{396C13D6-0DDA-4B95-BFE9-1ECE3557E6B6}.Release|Any CPU.Build.0 = Release|Any CPU
436-
{396C13D6-0DDA-4B95-BFE9-1ECE3557E6B6}.ReleaseWithDocs|Any CPU.ActiveCfg = Debug|Any CPU
437-
{396C13D6-0DDA-4B95-BFE9-1ECE3557E6B6}.ReleaseWithDocs|Any CPU.Build.0 = Debug|Any CPU
438417
{2AB8AD5F-2449-48A1-9659-F438C690BB03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
439418
{2AB8AD5F-2449-48A1-9659-F438C690BB03}.Debug|Any CPU.Build.0 = Debug|Any CPU
440419
{2AB8AD5F-2449-48A1-9659-F438C690BB03}.Release|Any CPU.ActiveCfg = Release|Any CPU
441420
{2AB8AD5F-2449-48A1-9659-F438C690BB03}.Release|Any CPU.Build.0 = Release|Any CPU
442-
{2AB8AD5F-2449-48A1-9659-F438C690BB03}.ReleaseWithDocs|Any CPU.ActiveCfg = Debug|Any CPU
443-
{2AB8AD5F-2449-48A1-9659-F438C690BB03}.ReleaseWithDocs|Any CPU.Build.0 = Debug|Any CPU
444421
{769A850B-DEA5-44AD-8F9B-30C72601D851}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
445422
{769A850B-DEA5-44AD-8F9B-30C72601D851}.Debug|Any CPU.Build.0 = Debug|Any CPU
446423
{769A850B-DEA5-44AD-8F9B-30C72601D851}.Release|Any CPU.ActiveCfg = Release|Any CPU
447424
{769A850B-DEA5-44AD-8F9B-30C72601D851}.Release|Any CPU.Build.0 = Release|Any CPU
448-
{769A850B-DEA5-44AD-8F9B-30C72601D851}.ReleaseWithDocs|Any CPU.ActiveCfg = Debug|Any CPU
449-
{769A850B-DEA5-44AD-8F9B-30C72601D851}.ReleaseWithDocs|Any CPU.Build.0 = Debug|Any CPU
450425
EndGlobalSection
451426
GlobalSection(SolutionProperties) = preSolution
452427
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)