Skip to content

Commit c5c94ee

Browse files
committed
ci: do not run publish if pr
1 parent e6659f8 commit c5c94ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/build-and-release.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,18 @@ jobs:
2727

2828
- name: Docker meta
2929
id: meta
30+
if: github.event_name != 'pull_request'
3031
uses: docker/metadata-action@v5
3132
with:
3233
sep-tags: ";"
3334
tags: |
3435
type=ref,event=branch
35-
type=ref,event=pr
3636
type=semver,pattern={{version}}
3737
3838
- name: Pack .NET project
39+
if: github.event_name != 'pull_request'
3940
run: dotnet pack Intility.Logging.sln -o Intility.Logging/output --no-build --property:TreatWarningsAsErrors=true --property:Version=${{ steps.meta.outputs.tags }}
4041

4142
- name: Publish to NuGet
43+
if: github.event_name != 'pull_request'
4244
run: dotnet nuget push Intility.Logging/output/*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)