Skip to content

Commit 3b11ca7

Browse files
committed
assembly metadata on build is wrong
1 parent eee5feb commit 3b11ca7

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,18 @@ jobs:
110110
# --- NuGet Common Package Build/Publish ---
111111
- name: Build PSGraph.Common (Debug on prerelease, Release on release)
112112
run: |
113-
if [ "${{ github.event.release.prerelease }}" = "true" ]; then
114-
dotnet build PSGraph.Common/PSGraph.Common.csproj --configuration Debug --no-restore
113+
if [ -n "${{ steps.set_version.outputs.prerelease }}" ]; then
114+
VERSION="${{ steps.set_version.outputs.version }}-${{ steps.set_version.outputs.prerelease }}"
115+
CONFIG=Debug
115116
else
116-
dotnet build PSGraph.Common/PSGraph.Common.csproj --configuration Release --no-restore
117+
VERSION="${{ steps.set_version.outputs.version }}"
118+
CONFIG=Release
117119
fi
120+
dotnet build PSGraph.Common/PSGraph.Common.csproj \
121+
--configuration $CONFIG \
122+
--no-restore \
123+
-p:PackageVersion="$VERSION" \
124+
-p:Version="$VERSION"
118125
119126
- name: Pack PSGraph.Common (Debug/pre-release on prerelease, Release on release)
120127
shell: bash
@@ -130,7 +137,8 @@ jobs:
130137
--configuration $CONFIG \
131138
--no-build \
132139
--output ./nupkg \
133-
/p:PackageVersion="$VERSION"
140+
-p:PackageVersion="$VERSION" \
141+
-p:Version="$VERSION"
134142
135143
- name: Publish PSGraph.Common to NuGet
136144
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)