Skip to content

Simplify npm publish workflow#26

Closed
jozefizso wants to merge 5 commits into
mainfrom
simplify-publish-workflow
Closed

Simplify npm publish workflow#26
jozefizso wants to merge 5 commits into
mainfrom
simplify-publish-workflow

Conversation

@jozefizso

@jozefizso jozefizso commented May 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Check the exact npm package version with tehpsalmist/npm-publish-status-action pinned to 01cb25946b194a7a5468f22c8e74db04c283f121.
  • Start the publish job only when that action reports exists == 0.
  • Keep the publish path small: npm ci, npm pack, GitHub artifact attestation, and npm publish --provenance.

Validation

  • Parsed .github/workflows/publish.yml with Ruby YAML.
  • Ran actionlint v1.7.12.
  • Ran git diff --check.

Leaving this PR open for maintainer review.

jozefizso and others added 3 commits May 2, 2026 13:30
## Summary
- update the publish workflow to Node.js 24 on macos-15-intel
- pack the npm tarball before publishing and attest that exact artifact
with GitHub artifact attestations
- publish to npm with provenance enabled and public scoped package
access

## Verification
- ruby YAML parse for publish workflow
- HFS test volume + ROOT_VOLUME=/Volumes/macos_alias npm test
- npm audit --audit-level=moderate
- npm ls --omit=dev --all
- npm pack --dry-run
## 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: 97e47e0ec6

ℹ️ 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".

name: publish to npmjs
if: github.event.release.prerelease == false
needs: check
if: needs.check.outputs.should_publish == 'true'

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 Re-check package availability immediately before publish

Using needs.check.outputs.should_publish as the sole gate means the publish decision is made at workflow start, then reused after a long macOS test/audit job. If two runs for the same release overlap (for example, a manual rerun while the first run is still executing), both can pass the early check, but the later run will still attempt npm publish and fail once the first run has already published that version. Previously, the check happened near the publish step, which greatly reduced this race window and allowed late runs to skip cleanly.

Useful? React with 👍 / 👎.

@jozefizso

Copy link
Copy Markdown
Member Author

Closing after force-resetting main back before the npm publish workflow work, per maintainer request.

@jozefizso jozefizso closed this May 2, 2026
@jozefizso jozefizso deleted the simplify-publish-workflow 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