From c03781ef5f4dfd7b20d3b3f9f68a3c9b2df15dab Mon Sep 17 00:00:00 2001 From: mvarendorff Date: Wed, 2 Oct 2024 10:55:27 +0200 Subject: [PATCH] fix: Fluss.Regen not usable as source generator --- .github/workflows/publish.yml | 13 ++++++++++++- src/Fluss.Regen/Fluss.Regen.csproj | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6d1577f..e001ecd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,9 +23,20 @@ jobs: 9.x - name: Strip v from tag to determine version run: echo "VERSION=${VERSION/v/}" >> $GITHUB_ENV + # dotnet pack says it already builds the project but it for some reason does not properly generate + # the analyzers directory when skipping an explicit build. It's unclear to me what the difference is. + - name: Build + run: dotnet build --configuration Release /p:Version=${VERSION} + working-directory: src/${{ matrix.package }} - name: Package - run: dotnet pack --configuration Release /p:Version=${VERSION} + run: dotnet pack --no-build --configuration Release /p:Version=${VERSION} working-directory: src/${{ matrix.package }} + - name: DEBUG - Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.package }}.nupkg + path: src/${{ matrix.package }}/bin/Release + retention-days: 1 - name: Publish run: dotnet nuget push bin/Release/${{ matrix.package }}.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} working-directory: src/${{ matrix.package }} diff --git a/src/Fluss.Regen/Fluss.Regen.csproj b/src/Fluss.Regen/Fluss.Regen.csproj index a4cabb9..273bd74 100644 --- a/src/Fluss.Regen/Fluss.Regen.csproj +++ b/src/Fluss.Regen/Fluss.Regen.csproj @@ -16,6 +16,10 @@ git MIT true + + $(NoWarn);NU5128 + false + false