Skip to content

Commit

Permalink
conditionally execute release steps based on branch
Browse files Browse the repository at this point in the history
  • Loading branch information
corstian committed Dec 31, 2024
1 parent 0c51b4a commit 1d06a20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
release:
needs: test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/heads/beta')
steps:
- uses: actions/checkout@v3
- name: Semantic Release
Expand Down Expand Up @@ -57,5 +58,5 @@ jobs:
dotnet build --configuration Release --no-restore
fi
- name: Publish
if: steps.semantic.outputs.new_release_published == 'true' && (startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/heads/beta'))
if: steps.semantic.outputs.new_release_published == 'true'
run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate

0 comments on commit 1d06a20

Please sign in to comment.