File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed
Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change 5252 run : npx pkg-pr-new publish --comment=update
5353
5454 - name : Publish preview package for main
55+ id : pkg_pr_new_main
5556 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
56- run : npx pkg-pr-new publish --comment=off
57+ run : |
58+ set -euo pipefail
59+ npx pkg-pr-new publish --comment=off --json=pkg-pr-new-main.json
60+
61+ - name : Summarize pkg.new output for main
62+ if : github.event_name == 'push' && github.ref == 'refs/heads/main' && always()
63+ run : |
64+ {
65+ echo "## pkg.new preview for main"
66+ echo
67+ if [ -f pkg-pr-new-main.json ]; then
68+ echo "Install commands and preview links:"
69+ echo '```text'
70+ jq -r '.. | strings | select(test("pkg\\.pr\\.new|pkg\\.new|npm (i|install) "))' pkg-pr-new-main.json | sort -u
71+ echo '```'
72+ else
73+ echo "No pkg.new JSON output file was produced."
74+ fi
75+ } >> "$GITHUB_STEP_SUMMARY"
76+
77+ - name : Upload pkg.new metadata for main
78+ if : github.event_name == 'push' && github.ref == 'refs/heads/main' && always()
79+ uses : actions/upload-artifact@v4
80+ with :
81+ name : pkg-pr-new-main-${{ github.sha }}
82+ path : pkg-pr-new-main.json
83+ if-no-files-found : warn
You can’t perform that action at this time.
0 commit comments