From 0f3b36833cb3a548deac18f62dc22b729161293b Mon Sep 17 00:00:00 2001 From: MrSmoke <709976+MrSmoke@users.noreply.github.com> Date: Thu, 9 Jul 2026 11:05:49 +1000 Subject: [PATCH] Use the version info from the git tag instead of defining in --- .github/workflows/release.yaml | 8 ++++++-- Directory.Build.props | 4 ---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 408c13f5..31fdb106 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,17 +17,21 @@ jobs: - name: Checkout uses: actions/checkout@v7 + - name: Get version from tag + id: version + run: echo "version=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT" + - name: Restore run: dotnet restore - name: Build - run: dotnet build --no-restore --configuration Release + run: dotnet build --no-restore --configuration Release -p:Version=${{ steps.version.outputs.version }} - name: Test run: dotnet test --no-build --configuration Release --logger trx --results-directory ./test-results/ - name: Package - run: dotnet pack --no-build --configuration Release --output ./build-output/ + run: dotnet pack --no-build --configuration Release --output ./build-output/ -p:Version=${{ steps.version.outputs.version }} - name: Upload nuget package artifacts uses: actions/upload-artifact@v7 diff --git a/Directory.Build.props b/Directory.Build.props index caa17878..1314746a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -11,10 +11,6 @@ CS1591 - - 1.14.0 - -