Skip to content

Commit 9c07cca

Browse files
authored
Use nightly build of docfx (#445)
See dotnet/docfx#10859 (comment)
1 parent 1520db7 commit 9c07cca

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

.github/workflows/build-documentation.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,22 @@ jobs:
6767
working-directory: EFCore.PG
6868

6969
- name: Get docfx
70-
run: dotnet tool install --version 2.78.4 -g docfx
70+
# We temporarily require a nightly biuld of docfx, supporting Roslyn 5.0.0 which Npgsql requires for its analyzer
71+
# (https://github.com/dotnet/docfx/pull/10859#issuecomment-3794308564)
72+
# run: dotnet tool install --version 2.78.4 -g docfx
73+
run: |
74+
# Get the latest nightly version from GitHub Packages
75+
version=$(gh api /orgs/dotnet/packages/nuget/docfx/versions --jq '.[0].name')
76+
echo "Installing docfx version: $version"
77+
78+
# Download the nupkg
79+
downloadUrl="https://nuget.pkg.github.com/dotnet/download/docfx/${version}/${version}.nupkg"
80+
curl -L -H "Authorization: Bearer $GH_TOKEN" -o "docfx.${version}.nupkg" "$downloadUrl"
81+
82+
# Install from local source
83+
dotnet tool update docfx -g --prerelease --add-source .
84+
env:
85+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7186

7287
- name: Build docs
7388
run: docfx --warningsAsErrors

0 commit comments

Comments
 (0)