Skip to content

Commit

Permalink
Fixing hard coded nuget package version and updating package version
Browse files Browse the repository at this point in the history
  • Loading branch information
riplikash committed Apr 25, 2024
1 parent ba8adb0 commit d14c5f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<version>' ./DapperAutoData/DapperAutoData.nuspec | sed 's|<version>\(.*\)</version>|\1|g')
echo "VERSION=$version"
echo "::set-output name=version::$version"
shell: bash

- name: List directories
run: |
cd DapperAutoData
Expand All @@ -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 }}"
2 changes: 1 addition & 1 deletion DapperAutoData/DapperAutoData.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>DapperAutoData</id>
<version>1.0.5</version>
<version>1.0.6</version>
<title>DapperAutoData</title>
<authors>Blake Stephens, Kaelin Stephens</authors>
<owners>Blake Stephens</owners>
Expand Down

0 comments on commit d14c5f9

Please sign in to comment.