Skip to content

Commit bfdaca7

Browse files
committed
fix: install docfx before build
1 parent 6d193af commit bfdaca7

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,31 @@ name: Build
1818
on:
1919
push:
2020
branches:
21-
- 'main'
22-
- 'develop'
21+
- "main"
22+
- "develop"
2323
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"
3030

3131
workflow_dispatch:
3232
inputs:
3333
push-to-dev:
34-
description: 'Push to internal NuGet'
34+
description: "Push to internal NuGet"
3535
required: false
3636
default: false
3737
type: boolean
3838
version:
39-
description: 'Version'
39+
description: "Version"
4040
required: false
4141
default: "0.0.0-prerelease.YYYYMMDD.B"
4242
type: string
4343
schedule:
44-
- cron: '0 0 * * *' # Every day at midnight
45-
44+
- cron: "0 0 * * *" # Every day at midnight
45+
4646
jobs:
4747
run-tests:
4848
name: Run tests
@@ -82,16 +82,15 @@ jobs:
8282
$versionProp.Project.PropertyGroup.YubicoYubiKeyVersion = "${{ github.event.inputs.version }}"
8383
$versionProp.Save($file.FullName)
8484
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
9187
run: |
9288
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
9594

9695
# Upload documentation
9796
- name: "Save build artifacts: Docs"
@@ -100,7 +99,7 @@ jobs:
10099
name: Documentation
101100
path: Yubico.YubiKey/docs/_site/
102101
if-no-files-found: error
103-
102+
104103
# Upload NuGet packages
105104
- name: "Save build artifacts: Nuget Packages"
106105
uses: actions/upload-artifact@v4
@@ -110,7 +109,7 @@ jobs:
110109
Yubico.Core/src/bin/Release/*.nupkg
111110
Yubico.YubiKey/src/bin/Release/*.nupkg
112111
if-no-files-found: error
113-
112+
114113
# Upload symbols
115114
- name: "Save build artifacts: Symbols Packages"
116115
uses: actions/upload-artifact@v4
@@ -120,7 +119,7 @@ jobs:
120119
Yubico.Core/src/bin/Release/*.snupkg
121120
Yubico.YubiKey/src/bin/Release/*.snupkg
122121
if-no-files-found: error
123-
122+
124123
# Upload assemblies
125124
- name: "Save build artifacts: Assemblies"
126125
uses: actions/upload-artifact@v4
@@ -130,7 +129,7 @@ jobs:
130129
Yubico.Core/src/bin/Release/**/*.dll
131130
Yubico.YubiKey/src/bin/Release/**/*.dll
132131
if-no-files-found: error
133-
132+
134133
# Generate artifact attestation
135134
- name: Generate artifact attestation
136135
uses: actions/attest-build-provenance@v2
@@ -142,7 +141,7 @@ jobs:
142141
Yubico.YubiKey/src/bin/Release/*.snupkg
143142
Yubico.Core/src/bin/Release/**/*.dll
144143
Yubico.YubiKey/src/bin/Release/**/*.dll
145-
144+
146145
upload-docs:
147146
name: Upload docs
148147
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'

0 commit comments

Comments
 (0)