Skip to content

ci: add secure release pipeline (prepare-release workflows)#259

Merged
pkosiec merged 19 commits intomainfrom
pkosiec/centralize-release
Apr 9, 2026
Merged

ci: add secure release pipeline (prepare-release workflows)#259
pkosiec merged 19 commits intomainfrom
pkosiec/centralize-release

Conversation

@pkosiec
Copy link
Copy Markdown
Member

@pkosiec pkosiec commented Apr 8, 2026

Summary

Adds a two-stage release pipeline where appkit prepares artifacts and a private secure repo handles npm publishing via OIDC Trusted Publishing.

What changed

  • .release-it.json configs updated to disable git/github/npm operations — now used only for version calculation and changelog generation
  • prepare-release.yml workflow (push to main): determines version via release-it, generates changelog, builds, packs, and uploads artifacts (.tgz, SHA256 digests, changelog diff, NOTICE.md) for the secure repo to consume
  • prepare-release-lakebase.yml for independent lakebase releases (triggered by packages/lakebase/** changes)
  • tools/check-template-deps.js + CI lint step: validates template/package.json uses exact versions (no ^, ~, >=, *)
  • Removed release.yml, release-lakebase.yml, and unused release/release:ci scripts

What stays the same

  • pnpm release:dry still works for local previews
  • Conventional commits still determine version bumps
  • No new dependencies added
  • CI workflows (lint, test, typecheck) unchanged

Secure repo (separate PR)

A companion workflow on the private secure repo polls for new prepare-release artifacts every 15 minutes, then: download → verify SHA256 → security scan → npm publish via OIDC → changelog + version bump + commit + tag + push → GitHub Release → template sync.

Test plan

  • pnpm release:dry still works locally
  • prepare-release workflow runs on push to main and uploads artifacts
  • prepare-release-lakebase triggers only on lakebase path changes
  • CI lint catches unpinned template deps
  • Secure repo cron picks up artifacts and publishes successfully

pkosiec added 15 commits April 8, 2026 14:37
Add two-stage release pipeline where appkit prepares artifacts and a
private secure repo handles npm publishing via OIDC Trusted Publishing.

Changes:
- Update .release-it.json configs to disable git/github/npm operations,
  used for version calculation and changelog generation only
- Add prepare-release.yml workflow (push to main): builds, packs, and
  uploads artifacts with SHA256 digests for the secure repo to consume
- Add prepare-release-lakebase.yml for independent lakebase releases
- Add template dependency pinning lint step to CI (tools/check-template-deps.js)
- Remove old release.yml and release-lakebase.yml workflows
- Remove unused release and release:ci package.json scripts
- Update CLAUDE.md releasing section with new architecture

Signed-off-by: Pawel Kosiec <[email protected]>
- Remove stale -c .release-it.prepare.json from workflow version checks
- Add pull_request trigger to prepare-release for PR testing
- Split VERSION into separate meta artifact for faster poll reads
- Refactor check-template-deps.js to TypeScript
- Add secure repo usage comment to sync-versions.ts

Signed-off-by: Pawel Kosiec <[email protected]>
Project-level .npmrc caused E401 in nested npm install (dev-playground
client postinstall). Match CI workflow pattern: use default ~/.npmrc.

Signed-off-by: Pawel Kosiec <[email protected]>
Bare tsx isn't on PATH in CI runners — use pnpm exec tsx like all
other workflow steps.

Signed-off-by: Pawel Kosiec <[email protected]>
Add PR trigger to prepare-release-lakebase workflow and trivial
changes to packages/appkit and packages/lakebase to produce
releasable commits for version detection.

TODO: revert before merging
Signed-off-by: Pawel Kosiec <[email protected]>
release-it uses git describe by default, which only finds tags
reachable from the current commit. On PR checkouts (merge commit),
tags may not be reachable. Setting getLatestTagFromAllRefs: true
considers all tags regardless of reachability.

Also remove 2>/dev/null from version check to show release-it errors.

Signed-off-by: Pawel Kosiec <[email protected]>
release-it fails with "ref HEAD is not a symbolic ref" on PR merge
commit checkouts. Use github.head_ref to checkout the actual branch.

Also revert trivial test changes in package source files — existing
conventional commits from main are sufficient for version detection.

Signed-off-by: Pawel Kosiec <[email protected]>
- Fix .release-it.prepare.json reference to .release-it.json in CLAUDE.md
- Add check-template-deps.ts to tools list in CLAUDE.md
- Add missing paths filter on pull_request trigger in prepare-release-lakebase
  so it only runs when lakebase files change (matching the push trigger)

Signed-off-by: Pawel Kosiec <[email protected]>
- New tools/finalize-release.ts: handles changelog splicing, version
  bumps, NOTICE copy, and git commit/tag for the secure release pipeline
- Updated tools/publish-template-tag.ts: added lockfile diff check to
  verify only @databricks/appkit* packages change during template sync

Signed-off-by: Pawel Kosiec <[email protected]>
… sync

- Add @databricks/appkit-ui to ALLOWED_PACKAGES so the lockfile diff
  check explicitly permits it (previously passed accidentally via
  substring match on @databricks/appkit)
- Add -s flag to template sync git commit for DCO compliance

Signed-off-by: Pawel Kosiec <[email protected]>
@pkosiec pkosiec marked this pull request as ready for review April 8, 2026 19:14
@pkosiec pkosiec force-pushed the pkosiec/centralize-release branch from cc5c7dd to 227e960 Compare April 8, 2026 19:27
…refs from prepare-release

- publish-template-tag.ts: push to HEAD instead of hardcoded main
  (HEAD == main in production, more flexible)
- Remove pull_request triggers from prepare-release workflows — these
  should only run on push to main
- Remove temporary ref override used for PR testing

Signed-off-by: Pawel Kosiec <[email protected]>
@pkosiec pkosiec force-pushed the pkosiec/centralize-release branch from 227e960 to 3644af4 Compare April 8, 2026 19:29
@pkosiec pkosiec changed the title feat: add secure release pipeline (prepare-release workflows) ci: add secure release pipeline (prepare-release workflows) Apr 8, 2026
The check verified that only @databricks/* packages changed in the
lockfile after npm install. In practice, bumping appkit legitimately
changes transitive dependencies (tanstack, hookform, etc.), causing
the check to block valid releases. Security is already covered by the
scan step on the secure release repo.

Signed-off-by: Pawel Kosiec <[email protected]>
pkosiec added 2 commits April 9, 2026 10:40
- Replace blocklist regex with allowlist in check-template-deps.ts to
  reject file:, git:, latest, and other non-pinned specifiers while
  allowing exact semver, pre-release tags, and npm aliases
- Find first version heading (## [) instead of assuming 3-line header
  in finalize-release.ts changelog insertion
- Document finalize-release.ts in CLAUDE.md tools list

Signed-off-by: Pawel Kosiec <[email protected]>
Route changelog diff to packages/lakebase/CHANGELOG.md when
stream=lakebase instead of always writing to root CHANGELOG.md.

Signed-off-by: Pawel Kosiec <[email protected]>
@pkosiec pkosiec merged commit 02b087c into main Apr 9, 2026
7 checks passed
@pkosiec pkosiec deleted the pkosiec/centralize-release branch April 9, 2026 08:56
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