Skip to content

Commit

Permalink
Update dotnet.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Hugo do Nascimento committed Apr 17, 2023
1 parent a0b441e commit b9b23cb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test
name: Build, Test and Publish

on:
push:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
name: Check Version
runs-on: ubuntu-latest
needs: build_and_test
# if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3

Expand All @@ -83,10 +83,10 @@ jobs:
if [[ " ${versions[@]} " =~ " ${currentVersions} " ]]; then
echo "❗️ The package version has not changed and it will not be published."
echo "publish=no" >> $GITHUB_OUTPUT
echo "publish=false" >> $GITHUB_OUTPUT
else
echo "✨ New version found and it will be published."
echo "publish=yes" >> $GITHUB_OUTPUT
echo "publish=true" >> $GITHUB_OUTPUT
fi
outputs:
publish: ${{ steps.should-published-versions.outputs.publish }}
Expand All @@ -96,7 +96,7 @@ jobs:
name: Publish package
runs-on: ubuntu-latest
needs: check_version
# if: ${{ needs.check_version.outputs.publish == 'yes' }}
if: ${{ needs.check_version.outputs.publish == 'true' }}
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v3
Expand All @@ -108,8 +108,8 @@ jobs:
with:
name: package

# - name: Publish .nupkg to NUGET
# run: dotnet nuget push *nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate
- name: Publish .nupkg to NUGET
run: dotnet nuget push *nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate

- name: Create release
uses: actions/github-script@v6
Expand Down

0 comments on commit b9b23cb

Please sign in to comment.