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