Skip to content

Add npm provenance publish workflow#17

Merged
jozefizso merged 1 commit intomainfrom
npm-provenance-publishing
May 2, 2026
Merged

Add npm provenance publish workflow#17
jozefizso merged 1 commit intomainfrom
npm-provenance-publishing

Conversation

@jozefizso
Copy link
Copy Markdown
Member

Summary

  • add a release-triggered workflow that publishes @appdmg/appdmg and @appdmg/cli
  • require macOS integration tests before publishing
  • pack and attest both npm tarballs, then publish those exact artifacts with provenance enabled
  • document npm Trusted Publisher settings and release order

Verification

  • ruby YAML parse for publish workflow
  • npm test
  • npm test --prefix packages/cli
  • npm audit --audit-level=moderate
  • npm audit --audit-level=moderate --prefix packages/cli
  • npm ls --omit=dev --all
  • npm ls --omit=dev --all --prefix packages/cli
  • npm pack --dry-run
  • npm pack --dry-run --prefix packages/cli
  • npm run test:integration

@jozefizso jozefizso merged commit 20d8b8a into main May 2, 2026
10 checks passed
Copy link
Copy Markdown

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

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: b95eab104e

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


on:
release:
types: [published]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restrict publish trigger to non-prerelease releases

Using release.types: [published] will also fire for GitHub prereleases, so this workflow can run npm publish for prerelease tags. Because npm publish here does not set a non-latest dist-tag, a prerelease run can unintentionally promote prerelease packages to normal consumers. Add a guard (for example, checking github.event.release.prerelease == false) or explicit prerelease tagging logic.

Useful? React with 👍 / 👎.

Comment on lines +113 to +114
- name: publish appdmg package
run: npm publish "$TARBALL" --provenance --access public
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 Make package publish steps rerun-safe

The workflow publishes @appdmg/appdmg and then @appdmg/cli in one linear job without checking whether a version is already on npm. If the first publish succeeds but the second fails (for example due to a transient npm outage), rerunning this workflow for the same release will fail on the first npm publish with “version already exists,” blocking recovery for the CLI package without creating a new release/version.

Useful? React with 👍 / 👎.

@jozefizso jozefizso deleted the npm-provenance-publishing 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