Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cwinland authored Jul 15, 2024
1 parent 115303e commit e672dec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
run: |
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
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 "VERSION=$VERSION" >> $GITHUB_ENV
else
echo "Error: Latest tag ($TAG) is not a valid SemVer version"
Expand All @@ -74,7 +74,7 @@ jobs:
run: |
OUTPUT=$(dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate)
echo "$OUTPUT"
if [[ $OUTPUT == *"Your package was pushed"* ]]; then
if ([[ $OUTPUT == *"Your package was pushed"* ]];) then
echo "Push successful"
else
echo "Push failed"
Expand Down

0 comments on commit e672dec

Please sign in to comment.