@@ -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,16 +82,15 @@ jobs:
82
82
$versionProp.Project.PropertyGroup.YubicoYubiKeyVersion = "${{ github.event.inputs.version }}"
83
83
$versionProp.Save($file.FullName)
84
84
85
- # Build the project
86
- - name : Build 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
85
+ # Install DocFX
86
+ - name : Install DocFX
91
87
run : |
92
88
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
89
+
90
+ # Build the project
91
+ - name : Build Yubico.NET.SDK.sln
92
+ run :
93
+ dotnet pack --configuration Release --nologo --verbosity minimal Yubico.NET.SDK.sln
95
94
96
95
# Upload documentation
97
96
- name : " Save build artifacts: Docs"
100
99
name : Documentation
101
100
path : Yubico.YubiKey/docs/_site/
102
101
if-no-files-found : error
103
-
102
+
104
103
# Upload NuGet packages
105
104
- name : " Save build artifacts: Nuget Packages"
106
105
uses : actions/upload-artifact@v4
@@ -110,7 +109,7 @@ jobs:
110
109
Yubico.Core/src/bin/Release/*.nupkg
111
110
Yubico.YubiKey/src/bin/Release/*.nupkg
112
111
if-no-files-found : error
113
-
112
+
114
113
# Upload symbols
115
114
- name : " Save build artifacts: Symbols Packages"
116
115
uses : actions/upload-artifact@v4
@@ -120,7 +119,7 @@ jobs:
120
119
Yubico.Core/src/bin/Release/*.snupkg
121
120
Yubico.YubiKey/src/bin/Release/*.snupkg
122
121
if-no-files-found : error
123
-
122
+
124
123
# Upload assemblies
125
124
- name : " Save build artifacts: Assemblies"
126
125
uses : actions/upload-artifact@v4
@@ -130,7 +129,7 @@ jobs:
130
129
Yubico.Core/src/bin/Release/**/*.dll
131
130
Yubico.YubiKey/src/bin/Release/**/*.dll
132
131
if-no-files-found : error
133
-
132
+
134
133
# Generate artifact attestation
135
134
- name : Generate artifact attestation
136
135
uses : actions/attest-build-provenance@v2
@@ -142,7 +141,7 @@ jobs:
142
141
Yubico.YubiKey/src/bin/Release/*.snupkg
143
142
Yubico.Core/src/bin/Release/**/*.dll
144
143
Yubico.YubiKey/src/bin/Release/**/*.dll
145
-
144
+
146
145
upload-docs :
147
146
name : Upload docs
148
147
if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
0 commit comments