From a80d8dca81de6003743970190a43fa4f0b34c554 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Fri, 6 Nov 2026 15:37:50 -0800 Subject: [PATCH] ci: build before packing in the publish workflow With GeneratePackageOnBuild=true, dotnet pack skips its build step and packs whatever is already in bin/. On a clean runner that is nothing, so pack failed with NU5026. Turning it off for the pack makes pack build first. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/publish.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f5e543b..9577684 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,12 +29,13 @@ jobs: with: dotnet-version: '10.0.x' + # GeneratePackageOnBuild=true makes pack skip its build, packing an empty bin/ on a clean runner. # Pack before logging in: the temporary key expires after an hour. - name: Pack run: | - dotnet pack ModernUO.Serialization.Annotations/ModernUO.Serialization.Annotations.csproj -c Release -o "$PACKAGE_DIR" - dotnet pack ModernUO.Serialization.Generator/ModernUO.Serialization.Generator.csproj -c Release -o "$PACKAGE_DIR" - dotnet pack ModernUO.Serialization.SchemaGenerator/ModernUO.Serialization.SchemaGenerator.csproj -c Release -o "$PACKAGE_DIR" + dotnet pack ModernUO.Serialization.Annotations/ModernUO.Serialization.Annotations.csproj -c Release -p:GeneratePackageOnBuild=false -o "$PACKAGE_DIR" + dotnet pack ModernUO.Serialization.Generator/ModernUO.Serialization.Generator.csproj -c Release -p:GeneratePackageOnBuild=false -o "$PACKAGE_DIR" + dotnet pack ModernUO.Serialization.SchemaGenerator/ModernUO.Serialization.SchemaGenerator.csproj -c Release -p:GeneratePackageOnBuild=false -o "$PACKAGE_DIR" - name: NuGet login (OIDC) id: login