Skip to content

Address publish workflow review feedback#25

Merged
jozefizso merged 1 commit into
mainfrom
address-publish-review-feedback
May 2, 2026
Merged

Address publish workflow review feedback#25
jozefizso merged 1 commit into
mainfrom
address-publish-review-feedback

Conversation

@jozefizso

Copy link
Copy Markdown
Member

Summary

  • skip npm publishing for GitHub prereleases so prerelease releases cannot publish the default latest dist-tag
  • check whether the exact package version already exists on npm
  • skip pack, attestation, artifact upload, and publish steps when the version is already published so workflow reruns are safe

Verification

  • YAML parse for publish workflow

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bad57bf9ac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +73 to +76
if npm view "${package_name}@${package_version}" version --json >/dev/null 2>&1; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Distinguish npm lookup failures from missing versions

The check npm package version step treats any npm view failure as exists=false, but non-zero exits can also come from transient/auth/registry errors (not only “version does not exist”). In those cases, the workflow will incorrectly proceed as if the version is unpublished, run pack/attest/upload, and then fail at publish (or lose rerun idempotency), which defeats the safety goal introduced by this change. Please only set exists=false for explicit not-found responses and fail the job for other npm view errors.

Useful? React with 👍 / 👎.

@jozefizso jozefizso merged commit 71f5332 into main May 2, 2026
4 checks passed
@jozefizso jozefizso deleted the address-publish-review-feedback branch May 2, 2026 12:39
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.

1 participant