Skip to content

ci: add preview release summary to GitHub Actions#941

Merged
fi3ework merged 1 commit intomainfrom
max/2026-02-05--12-53PM
Feb 5, 2026
Merged

ci: add preview release summary to GitHub Actions#941
fi3ework merged 1 commit intomainfrom
max/2026-02-05--12-53PM

Conversation

@fi3ework
Copy link
Copy Markdown
Member

@fi3ework fi3ework commented Feb 5, 2026

Summary

show a summary for prerelease

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings February 5, 2026 04:53
@fi3ework fi3ework enabled auto-merge (squash) February 5, 2026 04:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a GitHub Actions step summary and notification for the preview release workflow. The changes display package information and URLs generated by pkg-pr-new in the Actions summary tab and create a notice notification.

Changes:

  • Added an id: publish to the "Publish Preview" step to reference its outputs
  • Added a new "Preview summary" step that generates a formatted markdown summary showing SHA, packages, and URLs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- name: Publish Preview
id: publish
if: steps.changes.outputs.changed == 'true'
run: pnpx pkg-pr-new publish --pnpm ./packages/*
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Publish Preview" step runs pkg-pr-new as a command-line tool with pnpx, but the code attempts to access step outputs (steps.publish.outputs.sha, steps.publish.outputs.packages, steps.publish.outputs.urls) as if it were a GitHub Action.

When running pkg-pr-new via pnpx, it does not automatically set GitHub Actions outputs. The step would need to explicitly capture the command output and set it using GitHub Actions output syntax (e.g., echo "sha=value" >> "$GITHUB_OUTPUT").

To fix this, you need to either:

  1. Use pkg-pr-new as a GitHub Action (uses: statement) instead of running it via pnpx
  2. Manually parse the command output and set the GitHub Actions outputs
Suggested change
run: pnpx pkg-pr-new publish --pnpm ./packages/*
uses: stackblitz-labs/pkg.pr.new@v1
with:
pnpm: true
packages: ./packages/*

Copilot uses AI. Check for mistakes.
Comment on lines +62 to +80
{
echo "## pkg.pr.new preview"
echo ""
echo "**sha**: \`${{ steps.publish.outputs.sha }}\`"
echo ""
echo "### packages"
echo ""
for pkg in ${{ steps.publish.outputs.packages }}; do
echo "- \`$pkg\`"
done
echo ""
echo "### URLs"
echo ""
for url in ${{ steps.publish.outputs.urls }}; do
echo "- <$url>"
done
} >> "$GITHUB_STEP_SUMMARY"

echo "::notice title=pkg.pr.new::sha=${{ steps.publish.outputs.sha }} (see Summary for packages/urls)"
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Preview summary" step will fail if steps.publish.outputs.sha, steps.publish.outputs.packages, or steps.publish.outputs.urls are empty or undefined, since these expressions would expand to nothing and cause shell syntax errors or produce an incomplete summary.

Consider adding a check to ensure these outputs exist before using them, or set default values to handle cases where pkg-pr-new doesn't produce expected outputs.

Suggested change
{
echo "## pkg.pr.new preview"
echo ""
echo "**sha**: \`${{ steps.publish.outputs.sha }}\`"
echo ""
echo "### packages"
echo ""
for pkg in ${{ steps.publish.outputs.packages }}; do
echo "- \`$pkg\`"
done
echo ""
echo "### URLs"
echo ""
for url in ${{ steps.publish.outputs.urls }}; do
echo "- <$url>"
done
} >> "$GITHUB_STEP_SUMMARY"
echo "::notice title=pkg.pr.new::sha=${{ steps.publish.outputs.sha }} (see Summary for packages/urls)"
sha="${{ steps.publish.outputs.sha }}"
packages="${{ steps.publish.outputs.packages }}"
urls="${{ steps.publish.outputs.urls }}"
{
echo "## pkg.pr.new preview"
echo ""
echo "**sha**: \`${{ steps.publish.outputs.sha || 'N/A' }}\`"
echo ""
if [ -n "$packages" ]; then
echo "### packages"
echo ""
for pkg in $packages; do
echo "- \`$pkg\`"
done
echo ""
fi
if [ -n "$urls" ]; then
echo "### URLs"
echo ""
for url in $urls; do
echo "- <$url>"
done
fi
} >> "$GITHUB_STEP_SUMMARY"
echo "::notice title=pkg.pr.new::sha=${{ steps.publish.outputs.sha || 'N/A' }} (see Summary for packages/urls)"

Copilot uses AI. Check for mistakes.
Comment on lines +69 to +75
for pkg in ${{ steps.publish.outputs.packages }}; do
echo "- \`$pkg\`"
done
echo ""
echo "### URLs"
echo ""
for url in ${{ steps.publish.outputs.urls }}; do
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The for loop syntax will not work correctly with GitHub Actions expressions. The expression ${{ steps.publish.outputs.packages }} will be evaluated before the shell script runs and expanded as a single string, but bash needs proper word splitting. If the output contains spaces or special characters, this could fail or produce unexpected results.

Consider using a different approach, such as:

  1. Using jq to parse JSON output if pkg-pr-new provides JSON format
  2. Reading from a file if the output is written to a file
  3. Using proper quoting and array handling in bash

The same issue applies to the URLs loop on lines 75-77.

Suggested change
for pkg in ${{ steps.publish.outputs.packages }}; do
echo "- \`$pkg\`"
done
echo ""
echo "### URLs"
echo ""
for url in ${{ steps.publish.outputs.urls }}; do
mapfile -t pkgs <<< '${{ steps.publish.outputs.packages }}'
for pkg in "${pkgs[@]}"; do
echo "- \`$pkg\`"
done
echo ""
echo "### URLs"
echo ""
mapfile -t urls <<< '${{ steps.publish.outputs.urls }}'
for url in "${urls[@]}"; do

Copilot uses AI. Check for mistakes.
Comment on lines +75 to +77
for url in ${{ steps.publish.outputs.urls }}; do
echo "- <$url>"
done
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The for loop syntax will not work correctly with GitHub Actions expressions. The expression ${{ steps.publish.outputs.urls }} will be evaluated before the shell script runs and expanded as a single string, but bash needs proper word splitting. If the output contains spaces or special characters, this could fail or produce unexpected results.

Consider using a different approach, such as:

  1. Using jq to parse JSON output if pkg-pr-new provides JSON format
  2. Reading from a file if the output is written to a file
  3. Using proper quoting and array handling in bash

Copilot uses AI. Check for mistakes.
@fi3ework fi3ework force-pushed the max/2026-02-05--12-53PM branch from ca6b48f to bf4c7cd Compare February 5, 2026 05:17
@fi3ework fi3ework merged commit 7b64c24 into main Feb 5, 2026
9 checks passed
@fi3ework fi3ework deleted the max/2026-02-05--12-53PM branch February 5, 2026 05:42
@9aoy 9aoy mentioned this pull request Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants