@@ -18,31 +18,31 @@ name: Build
18
18
on :
19
19
push :
20
20
branches :
21
- - " main"
22
- - " develop"
21
+ - ' main'
22
+ - ' develop'
23
23
paths :
24
- - " **.h"
25
- - " **.c"
26
- - " **.cs"
27
- - " **.csproj"
28
- - " **.sln"
29
- - " .github/workflows/build.yml"
24
+ - ' **.h'
25
+ - ' **.c'
26
+ - ' **.cs'
27
+ - ' **.csproj'
28
+ - ' **.sln'
29
+ - ' .github/workflows/build.yml'
30
30
31
31
workflow_dispatch :
32
32
inputs :
33
33
push-to-dev :
34
- description : " Push to internal NuGet"
34
+ description : ' Push to internal NuGet'
35
35
required : false
36
36
default : false
37
37
type : boolean
38
38
version :
39
- description : " Version"
39
+ description : ' Version'
40
40
required : false
41
41
default : " 0.0.0-prerelease.YYYYMMDD.B"
42
42
type : string
43
43
schedule :
44
- - cron : " 0 0 * * *" # Every day at midnight
45
-
44
+ - cron : ' 0 0 * * *' # Every day at midnight
45
+
46
46
jobs :
47
47
run-tests :
48
48
name : Run tests
@@ -82,15 +82,16 @@ jobs:
82
82
$versionProp.Project.PropertyGroup.YubicoYubiKeyVersion = "${{ github.event.inputs.version }}"
83
83
$versionProp.Save($file.FullName)
84
84
85
- # Install DocFX
86
- - name : Install DocFX
87
- run : |
88
- dotnet tool install --global docfx --version 2.78.2
89
-
90
85
# Build the project
91
86
- name : Build Yubico.NET.SDK.sln
92
- run :
93
- dotnet pack --configuration Release --nologo --verbosity minimal Yubico.NET.SDK.sln
87
+ run : dotnet pack --configuration Release --nologo --verbosity minimal Yubico.NET.SDK.sln
88
+
89
+ # Build the documentation
90
+ - name : Build docs
91
+ run : |
92
+ dotnet tool install --global docfx --version 2.78.2
93
+ docfx --version
94
+ docfx Yubico.YubiKey/src/docfx.json --logLevel warning --log Yubico.YubiKey/docs/log.txt --warningsAsErrors
94
95
95
96
# Upload documentation
96
97
- name : " Save build artifacts: Docs"
99
100
name : Documentation
100
101
path : Yubico.YubiKey/docs/_site/
101
102
if-no-files-found : error
102
-
103
+
103
104
# Upload NuGet packages
104
105
- name : " Save build artifacts: Nuget Packages"
105
106
uses : actions/upload-artifact@v4
@@ -109,7 +110,7 @@ jobs:
109
110
Yubico.Core/src/bin/Release/*.nupkg
110
111
Yubico.YubiKey/src/bin/Release/*.nupkg
111
112
if-no-files-found : error
112
-
113
+
113
114
# Upload symbols
114
115
- name : " Save build artifacts: Symbols Packages"
115
116
uses : actions/upload-artifact@v4
@@ -119,7 +120,7 @@ jobs:
119
120
Yubico.Core/src/bin/Release/*.snupkg
120
121
Yubico.YubiKey/src/bin/Release/*.snupkg
121
122
if-no-files-found : error
122
-
123
+
123
124
# Upload assemblies
124
125
- name : " Save build artifacts: Assemblies"
125
126
uses : actions/upload-artifact@v4
@@ -129,7 +130,7 @@ jobs:
129
130
Yubico.Core/src/bin/Release/**/*.dll
130
131
Yubico.YubiKey/src/bin/Release/**/*.dll
131
132
if-no-files-found : error
132
-
133
+
133
134
# Generate artifact attestation
134
135
- name : Generate artifact attestation
135
136
uses : actions/attest-build-provenance@v2
@@ -141,7 +142,7 @@ jobs:
141
142
Yubico.YubiKey/src/bin/Release/*.snupkg
142
143
Yubico.Core/src/bin/Release/**/*.dll
143
144
Yubico.YubiKey/src/bin/Release/**/*.dll
144
-
145
+
145
146
upload-docs :
146
147
name : Upload docs
147
148
if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
0 commit comments