Skip to content

Commit 908e43a

Browse files
authored
Merge pull request #320 from w-ahmad/chore/pr-nuget-package-comment
chore: Add PR comment when dev NuGet package is published
2 parents f350b5c + ccb04d7 commit 908e43a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/ci-build.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,16 @@ jobs:
5959
- name: Push to NuGet
6060
run: |
6161
dotnet nuget push artifacts\NuGet\Release\*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
62+
63+
- name: Comment on PR
64+
if: github.event_name == 'pull_request'
65+
uses: actions/github-script@v7
66+
with:
67+
script: |
68+
const packageVersion = '0.0.${{ github.run_number }}-dev';
69+
await github.rest.issues.createComment({
70+
owner: context.repo.owner,
71+
repo: context.repo.repo,
72+
issue_number: context.issue.number,
73+
body: `🚀 A NuGet package is now available to test these changes: https://www.nuget.org/packages/WinUI.TableView/${packageVersion}`
74+
});

0 commit comments

Comments
 (0)