Skip to content

Commit

Permalink
Update BuildAndRelease.yml
Browse files Browse the repository at this point in the history
Update version retrieval
  • Loading branch information
cwinland authored Oct 20, 2023
1 parent e84489f commit 972ca87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/BuildAndRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ jobs:
TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
VERSION=${TAG#v} # Remove 'v' from the beginning of the tag
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ ]]; then
echo ::set-output name=VERSION::$VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
else
echo "Error: Latest tag ($TAG) is not a valid SemVer version"
exit 1
fi
- name: Creating a package
run: dotnet pack Wpf.NotificationCenter/Wpf.NotificationCenter.csproj --no-build -c Release -o . /p:PackageVersion=${{ steps.gettag.outputs.TAG }}
run: dotnet pack Wpf.NotificationCenter/Wpf.NotificationCenter.csproj --no-build -c Release -o . /p:PackageVersion=${{ env.VERSION }}

- name: Publish to Nuget
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate -n

0 comments on commit 972ca87

Please sign in to comment.