Skip to content

Commit 6e79cae

Browse files
authored
don't push packages for PRs
1 parent 94d2804 commit 6e79cae

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

.github/workflows/ci-build.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
needs: build
6161
runs-on: windows-2022
6262
environment: ci-nuget-publish
63+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
6364
steps:
6465
- name: Download artifacts
6566
uses: actions/download-artifact@v4
@@ -70,16 +71,3 @@ jobs:
7071
- name: Push to NuGet
7172
run: |
7273
dotnet nuget push packages\*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
73-
74-
- name: Comment on PR
75-
if: github.event_name == 'pull_request'
76-
uses: actions/github-script@v7
77-
with:
78-
script: |
79-
const packageVersion = '0.0.${{ github.run_number }}-dev';
80-
await github.rest.issues.createComment({
81-
owner: context.repo.owner,
82-
repo: context.repo.repo,
83-
issue_number: context.issue.number,
84-
body: `🚀 A NuGet package is now available to test these changes: https://www.nuget.org/packages/WinUI.TableView/${packageVersion}`
85-
});

0 commit comments

Comments
 (0)