Skip to content

feat: initial release + publishing infrastructure#36

Merged
sarahxsanders merged 7 commits into
mainfrom
npm-publish
Jun 8, 2026
Merged

feat: initial release + publishing infrastructure#36
sarahxsanders merged 7 commits into
mainfrom
npm-publish

Conversation

@sarahxsanders

Copy link
Copy Markdown
Collaborator

we're ready to publish the warlock to npm. this PR gets the repo ready for that

details

adds CI + CodeQL + a release-please-based release workflow

the actual publish is gated by a Release GitHub Environment and goes out via npm OIDC trusted publishing with provenance

  • Approver for releases: @PostHog/team-docs-wizard
  • No dedicated GitHub App. release-please commits the version bump via its release PR (merged by a human), and the publish job authenticates to npm via OIDC

Changes

  • .github/workflows/ci.yml: test + build on PR
  • .github/workflows/codeql.yml: CodeQL weekly + on PR
  • .github/workflows/release.yml: release-please + OIDC publish gated by Release env
  • .github/dependabot.yml: weekly npm + GitHub Actions updates
  • .github/CODEOWNERS: Docs & Wizard team
  • release-please-config.json + .release-please-manifest.json: bootstrap config
  • .nvmrc: Node 22
  • package.json: version → 0.1.0, removed private, added repository, pinned @virustotal/yara-x to exact
  • README.md: new "Releasing" section explaining the flow

Setup work post-merge

  • Create Release GitHub Environment with @PostHog/team-docs-wizard as required reviewer (prevent self-review on, admin bypass off, deployment branches restricted to main) ✅
  • npx setup-npm-trusted-publish @posthog/warlock (note: capital PostHog) coming soon

Test plan

  • pnpm test passes (516/516)
  • pnpm build clean
  • Workflow YAML parses

Adds CI, CodeQL, and a release-please workflow that publishes
@posthog/warlock to npm via OIDC trusted publishing + provenance.
No long-lived NPM_TOKEN.

The publish step is gated by a Release GitHub Environment with
@PostHog/team-docs-wizard as required reviewers. Slack notifications
are intentionally omitted for v1 - GitHub's native env-pending
notifications are sufficient given the lower release cadence.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sarahxsanders sarahxsanders requested a review from a team June 5, 2026 18:38
@sarahxsanders

Copy link
Copy Markdown
Collaborator Author

tagging @PostHog/team-security to make sure everything looks good. if there's another way you'd prefer we do this, lmk. I have it set up to match the way we do releases for the wizard + some extra steps from https://posthog.com/handbook/engineering/sdks/releases

@sarahxsanders sarahxsanders requested a review from a team June 5, 2026 18:39
sarahxsanders and others added 2 commits June 5, 2026 14:56
CI was failing at `pnpm store path` (called by setup-node's pnpm cache
setup) with "packages field missing or empty". Two fixes, belt-and-suspenders:

- Bump CI workflow pnpm from 9 to 10 to match the version used locally
  and in release.yml. pnpm 10 is lenient about pnpm-workspace.yaml.
- Add an explicit `packages: ['.']` to pnpm-workspace.yaml so the file
  is valid for any future pnpm 9 or stricter tooling that reads it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
GitHub's default CodeQL setup is already enabled on this repo and
conflicts with an advanced workflow file. Leaning on the default for
v1 to unblock the first publish; we can switch to advanced (with
SHA-pinned actions and security-and-quality queries) as a follow-up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@feliperalmeida feliperalmeida 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.

Can we set a 7 days cool down time for dependencies to avoid supply chain attacks via malicious packages?
https://pnpm.io/settings#minimumreleaseage

sarahxsanders and others added 2 commits June 7, 2026 19:43
Addresses semgrep findings (3 blocking) and Felipe's PR feedback,
both pointing at the same hardening called out in the Shai-Hulud
post-mortem: refuse to install dependency versions published less
than 7 days ago, so we're not the first to get burned by a
malicious release.

- pnpm-workspace.yaml: minimumReleaseAge: 10080 (minutes = 7 days)
- .github/dependabot.yml: cooldown.default-days: 7 on both
  package-ecosystem entries (npm + github-actions)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sarahxsanders

Copy link
Copy Markdown
Collaborator Author

Can we set a 7 days cool down time for dependencies to avoid supply chain attacks via malicious packages? pnpm.io/settings#minimumreleaseage

added! 🙏

@edwinyjlim edwinyjlim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

WIZARD, MEET YOUR FUCKING MAKER

  • Warlock

Comment thread package.json Outdated
Reverts the exact pin so consumers of @posthog/warlock can pick up
yara-x patch fixes (including future security patches) without
needing a manual override. Reproducibility for our own installs is
already handled by the lockfile, and minimumReleaseAge gates new
versions for 7 days.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sarahxsanders sarahxsanders changed the title chore: set up release infrastructure feat: initial release Jun 8, 2026
@sarahxsanders sarahxsanders changed the title feat: initial release feat: initial release + publishing infrastructure Jun 8, 2026
@sarahxsanders sarahxsanders merged commit 5cf7514 into main Jun 8, 2026
10 checks passed
@sarahxsanders sarahxsanders deleted the npm-publish branch June 8, 2026 14:30
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.

4 participants