diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 51c6e0c..bcf5a0d 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -71,6 +71,18 @@ jobs: - name: Build run: dotnet build --no-restore --configuration Release + - name: Verify OpenAPI document is up to date + run: | + dotnet build .\src\AzraTasks.Api\AzraTasks.Api.csproj ` + --configuration Release ` + --no-restore ` + -p:PublishAot=false ` + -p:OpenApiGenerateDocuments=true ` + -p:OpenApiGenerateDocumentsOnBuild=true + + git update-index --refresh + git --no-pager diff --exit-code -- .\src\AzraTasks.Api\AzraTasks.Api.json + - name: Restore dotnet tool run: dotnet tool restore diff --git a/src/AzraTasks.Api/AzraTasks.Api.csproj b/src/AzraTasks.Api/AzraTasks.Api.csproj index 0340b9c..eac6bab 100644 --- a/src/AzraTasks.Api/AzraTasks.Api.csproj +++ b/src/AzraTasks.Api/AzraTasks.Api.csproj @@ -12,6 +12,14 @@ . + + true + true + Speed + false + false + +