From d14c5f916e664b5c6b2e856a50cc79ee5d724894 Mon Sep 17 00:00:00 2001 From: Blake Stephens Date: Thu, 25 Apr 2024 13:23:48 -0400 Subject: [PATCH] Fixing hard coded nuget package version and updating package version --- .github/workflows/main.yml | 10 +++++++++- DapperAutoData/DapperAutoData.nuspec | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c5577e4..9782381 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,14 @@ jobs: - name: Pack run: dotnet pack DapperAutoData/DapperAutoData.csproj --configuration Release --output ./packages + - name: Extract version + id: get_version + run: | + version=$(grep '' ./DapperAutoData/DapperAutoData.nuspec | sed 's|\(.*\)|\1|g') + echo "VERSION=$version" + echo "::set-output name=version::$version" + shell: bash + - name: List directories run: | cd DapperAutoData @@ -34,4 +42,4 @@ jobs: nuget-api-key: ${{ secrets.NUGET_API_KEY }} - name: Upload Package - run: dotnet nuget push ./packages/DapperAutoData.1.0.0.nupkg --source "https://api.nuget.org/v3/index.json" --skip-duplicate --api-key "${{ secrets.NUGET_API_KEY }}" + run: dotnet nuget push ./packages/DapperAutoData.${{ steps.get_version.outputs.version }}.nupkg --source "https://api.nuget.org/v3/index.json" --skip-duplicate --api-key "${{ secrets.NUGET_API_KEY }}" diff --git a/DapperAutoData/DapperAutoData.nuspec b/DapperAutoData/DapperAutoData.nuspec index 84eab74..a98e2bd 100644 --- a/DapperAutoData/DapperAutoData.nuspec +++ b/DapperAutoData/DapperAutoData.nuspec @@ -2,7 +2,7 @@ DapperAutoData - 1.0.5 + 1.0.6 DapperAutoData Blake Stephens, Kaelin Stephens Blake Stephens