Skip to content

Commit 986d552

Browse files
committed
Align preview bundle releases and naming
1 parent fee97de commit 986d552

47 files changed

Lines changed: 512 additions & 140 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ corepack pnpm changeset
2222

2323
Pick the affected packages, the bump type (patch / minor / major), and write a one-line summary. A markdown file appears in this directory and gets committed with your PR.
2424

25-
## Alpha prerelease mode
25+
## Alpha versions, preview channel
2626

27-
The repo is currently in changesets **prerelease mode** with the `alpha` tag (see `.changeset/pre.json`). While in this mode:
27+
The repo is currently in changesets **prerelease mode** with the `alpha` tag
28+
(see `.changeset/pre.json`). The `alpha` tag controls the version suffix; the
29+
public npm channel for community testing is `preview`. While in this mode:
2830

2931
- `changeset version` cuts versions like `0.1.0-alpha.0`, `0.1.0-alpha.1`, …
30-
- `changeset publish` publishes them under the **`alpha`** npm dist-tag, **not** `latest`. So `npm install @zitadel/cli` keeps resolving the last stable release; consumers opt into prereleases with `@zitadel/cli@alpha`.
31-
- A package that has never had a stable release is published to `latest` on its first publish (changesets behaviour), then to `alpha` thereafter until it has a stable release.
32+
- `changeset publish --tag preview` publishes them under the **`preview`** npm dist-tag, **not** `latest`. So `npm install @zitadel/cli` keeps resolving the last stable release; consumers opt into preview bundles with `@zitadel/cli@preview`.
33+
- The public packages are configured as a fixed MVP preview group, so the Version Packages PR keeps their versions aligned.
3234

3335
To leave alpha and cut a stable `latest` release:
3436

@@ -39,7 +41,7 @@ corepack pnpm changeset version # strips the -alpha suffix
3941

4042
## Publishing (npm trusted publishing / OIDC)
4143

42-
The [`.github/workflows/release-npm.yml`](../.github/workflows/release-npm.yml) workflow runs the [changesets GitHub Action](https://github.com/changesets/action). Pushing changesets to `main` opens a "Version Packages" PR aggregating all pending changesets; merging that PR bumps versions, updates `CHANGELOG.md` files, and publishes to npm (under the `alpha` dist-tag while in prerelease mode).
44+
The [`.github/workflows/release-npm.yml`](../.github/workflows/release-npm.yml) workflow runs the [changesets GitHub Action](https://github.com/changesets/action). Pushing changesets to `main` opens a "Version Packages" PR aggregating all pending changesets; merging that PR bumps versions, updates `CHANGELOG.md` files, and publishes to npm (under the `preview` dist-tag while in prerelease mode). Package-level GitHub Releases are disabled; GoReleaser owns the product-level `ZITADEL Preview` releases.
4345

4446
Publishing authenticates with **npm trusted publishing (OIDC)** — there is **no `NPM_TOKEN`** secret. Before the first automated publish, a maintainer must, once per public package:
4547

.changeset/config.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,19 @@
22
"$schema": "https://unpkg.com/@changesets/config@latest/schema.json",
33
"changelog": ["@changesets/changelog-github", { "repo": "zitadel/nextgen" }],
44
"commit": false,
5-
"fixed": [],
5+
"fixed": [
6+
[
7+
"@zitadel/cli",
8+
"@zitadel/api",
9+
"@zitadel/components",
10+
"@zitadel/sdk-core",
11+
"@zitadel/sdk-next",
12+
"@zitadel/sdk-nuxt",
13+
"@zitadel/sdk-react",
14+
"@zitadel/sdk-vue",
15+
"@zitadel/sdk-angular"
16+
]
17+
],
618
"linked": [],
719
"access": "public",
820
"baseBranch": "main",
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@zitadel/cli": patch
3+
"@zitadel/api": patch
4+
"@zitadel/components": patch
5+
"@zitadel/sdk-core": patch
6+
"@zitadel/sdk-next": patch
7+
"@zitadel/sdk-nuxt": patch
8+
"@zitadel/sdk-react": patch
9+
"@zitadel/sdk-vue": patch
10+
"@zitadel/sdk-angular": patch
11+
---
12+
13+
Publish the MVP preview bundle through the `preview` channel and align CLI, SDK, component, and local runtime image naming.

.github/instructions/consumer-journey.instructions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ demo-app e2e suite.
1212
- Produce package artifacts with `corepack pnpm --dir <package> pack` and keep
1313
tarball verification for required package presence plus unresolved
1414
`catalog:` or `workspace:` dependency specs.
15-
- Pack only the six public Zitadel packages. Private support packages such as
16-
design tokens must not be uploaded or published to Verdaccio.
15+
- Pack only the public preview Zitadel packages. Private support packages such
16+
as design tokens must not be uploaded or published to Verdaccio.
1717
- Keep Verdaccio proxying npmjs for third-party dependencies while publishing
18-
Zitadel tarballs under both `alpha` and `latest`.
18+
Zitadel tarballs under the `preview` dist-tag.
1919
- Keep generated Next.js apps outside the repo and use `npm` inside the
2020
generated app to match the documented consumer path.
2121
- Preserve the CLI setup JSON contract: `--non-interactive --json` must parse

.github/instructions/release-docs.instructions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ state of the repo.
1616
- The release workflow is manual and draft-oriented while the repo is
1717
pre-release. Do not imply official npm publishing is enabled.
1818
- npm package changes use changesets; Go server releases use GoReleaser.
19+
- Public preview docs should use `@zitadel/cli@preview` and
20+
`ghcr.io/zitadel/zitadel-preview`; keep `nextgen` only for repo-internal or
21+
temporary compatibility alias contexts.
1922
- Keep licensing text aligned with `LICENSING.md`: AGPL-3.0-only by default,
2023
MIT exceptions for CLI, SDKs, API contracts, and docs.
2124
- Docs that mention repo behavior should point to `AGENTS.md`; docs that mention

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
# for ubuntu-latest smoke jobs (see quickstart-smoke).
149149
IMAGE_ID=""
150150
IMAGE_REF=""
151-
for id in $(docker images ghcr.io/zitadel/nextgen --format '{{.ID}}' | sort -u); do
151+
for id in $(docker images ghcr.io/zitadel/zitadel-preview --format '{{.ID}}' | sort -u); do
152152
arch=$(docker image inspect -f '{{.Architecture}}' "$id")
153153
ref=$(docker image inspect -f '{{index .RepoTags 0}}' "$id")
154154
case "$ref" in *snapshot*) ;; *) continue ;; esac
@@ -159,12 +159,12 @@ jobs:
159159
fi
160160
done
161161
if [ -z "$IMAGE_ID" ]; then
162-
echo "::error::no linux/amd64 snapshot image found for ghcr.io/zitadel/nextgen"
163-
docker images ghcr.io/zitadel/nextgen
162+
echo "::error::no linux/amd64 snapshot image found for ghcr.io/zitadel/zitadel-preview"
163+
docker images ghcr.io/zitadel/zitadel-preview
164164
exit 1
165165
fi
166166
# Save by a stable local tag: docker save by ID drops repo tags from the tarball.
167-
CI_IMAGE="ghcr.io/zitadel/nextgen:ci-snapshot-smoke-amd64"
167+
CI_IMAGE="ghcr.io/zitadel/zitadel-preview:ci-snapshot-smoke-amd64"
168168
docker tag "$IMAGE_ID" "$CI_IMAGE"
169169
echo "$CI_IMAGE" > dist/nextgen-image.tag
170170
docker save "$CI_IMAGE" -o dist/nextgen-image.tar
@@ -201,7 +201,7 @@ jobs:
201201
key: embedded-postgres-${{ runner.os }}-${{ hashFiles('go.sum') }}
202202
- name: Extract linux/amd64 server binary
203203
run: |
204-
TARBALL="$(find goreleaser-dist -name 'nextgen_*_linux_amd64.tar.gz' | head -1)"
204+
TARBALL="$(find goreleaser-dist -name 'zitadel-preview_*_linux_amd64.tar.gz' | head -1)"
205205
test -n "$TARBALL"
206206
tar -xzf "$TARBALL" -C .
207207
test -x ./nextgen
@@ -541,14 +541,14 @@ jobs:
541541
542542
- name: Dry-run npm packs
543543
run: |
544-
for dir in apps/cli packages/api packages/components packages/sdk-core packages/sdk-next packages/sdk-nuxt; do
544+
for dir in apps/cli packages/api packages/components packages/sdk-core packages/sdk-next packages/sdk-nuxt packages/sdk-react packages/sdk-vue packages/sdk-angular; do
545545
corepack pnpm --dir "$dir" pack --dry-run
546546
done
547547
548548
- name: Create npm package artifacts
549549
run: |
550550
mkdir -p "$RUNNER_TEMP/zitadel-npm-packages"
551-
for dir in apps/cli packages/api packages/components packages/sdk-core packages/sdk-next packages/sdk-nuxt; do
551+
for dir in apps/cli packages/api packages/components packages/sdk-core packages/sdk-next packages/sdk-nuxt packages/sdk-react packages/sdk-vue packages/sdk-angular; do
552552
corepack pnpm --dir "$dir" pack --pack-destination "$RUNNER_TEMP/zitadel-npm-packages"
553553
done
554554
ls -lh "$RUNNER_TEMP/zitadel-npm-packages"

.github/workflows/release-npm.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ name: release-npm
77
# merging that PR publishes to npm.
88
#
99
# The repo is in changesets PRERELEASE mode (.changeset/pre.json, tag "alpha"),
10-
# so versions are cut as X.Y.Z-alpha.N and published under the `alpha` npm
10+
# so versions are cut as X.Y.Z-alpha.N and published under the `preview` npm
1111
# dist-tag — `npm install @zitadel/cli` keeps resolving the last stable
12-
# `latest`; consumers opt into prereleases with `@zitadel/cli@alpha`. Run
12+
# `latest`; consumers opt into preview bundles with `@zitadel/cli@preview`. Run
1313
# `pnpm changeset pre exit` to leave alpha and cut a stable `latest` release.
1414
#
1515
# Authentication uses npm trusted publishing (OIDC) — there is no NPM_TOKEN.
@@ -88,12 +88,14 @@ jobs:
8888
run: corepack pnpm nx run-many -t build
8989

9090
- name: Create release PR or publish to npm
91+
id: changesets
9192
uses: changesets/action@v1
9293
with:
9394
version: corepack pnpm changeset version
94-
publish: corepack pnpm changeset publish
95+
publish: corepack pnpm changeset publish --tag preview
9596
title: "chore: version packages"
9697
commit: "chore: version packages"
98+
createGithubReleases: false
9799
env:
98100
# App token (not GITHUB_TOKEN) so the Version Packages PR triggers CI.
99101
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ jobs:
5959
- name: Set up Docker Buildx
6060
uses: docker/setup-buildx-action@v4
6161

62+
- name: Verify preview bundle versions
63+
if: ${{ ! inputs.snapshot }}
64+
run: node scripts/verify-preview-release.mjs --tag "${{ inputs.ref }}"
65+
6266
- name: Login to GHCR
6367
if: ${{ ! inputs.snapshot }}
6468
uses: docker/login-action@v4

.goreleaser.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ archives:
3232
format_overrides:
3333
- goos: windows
3434
formats: [zip]
35-
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
35+
name_template: 'zitadel-preview_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
3636
files:
3737
- LICENSE
3838
- README.md
@@ -41,11 +41,14 @@ dockers_v2:
4141
- id: nextgen
4242
ids: [nextgen]
4343
images:
44+
- 'ghcr.io/zitadel/zitadel-preview'
45+
# Temporary compatibility alias while the repository is still named nextgen.
4446
- 'ghcr.io/zitadel/nextgen'
4547
tags:
4648
- '{{ .Version }}'
47-
# Skip `latest` for snapshots so they don't clobber the published tag.
48-
- '{{ if not .IsSnapshot }}latest{{ end }}'
49+
# The public moving prerelease channel is `preview`; never publish
50+
# prerelease artifacts to Docker `latest`.
51+
- '{{ if not .IsSnapshot }}preview{{ end }}'
4952
platforms:
5053
- linux/amd64
5154
- linux/arm64
@@ -69,4 +72,5 @@ changelog:
6972
use: github
7073

7174
release:
75+
name_template: 'ZITADEL Preview {{ .Version }}'
7276
draft: true

AGENTS.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ Secrets").
4949
Playwright project. It installs local package tarballs through a temporary
5050
registry and verifies CLI setup plus real registration/login flows.
5151
- `packages/components/` contains shared Lit components.
52-
- `packages/sdk-core/`, `packages/sdk-next/`, and `packages/sdk-nuxt/` contain
53-
public TypeScript SDKs.
52+
- `packages/sdk-core/`, `packages/sdk-next/`, `packages/sdk-nuxt/`,
53+
`packages/sdk-react/`, `packages/sdk-vue/`, and `packages/sdk-angular/`
54+
contain public TypeScript SDKs.
5455
- `packages/api-mock/` contains the in-process MSW handlers and standalone
5556
mock auth server used by demos and e2e tests.
5657
- `packages/lint/` contains the local Nx plugin that infers Oxlint targets.
@@ -74,12 +75,12 @@ Secrets").
7475

7576
| I want to... | Run |
7677
| --------------------------------- | -------------------------------------------------------------- |
77-
| Check local runtime prerequisites | `npx @zitadel/cli@alpha doctor` |
78-
| Start local Zitadel | `npx @zitadel/cli@alpha start` |
79-
| Add auth to Next.js | `npx @zitadel/cli@alpha setup --framework next --server local` |
80-
| Check generated app files | `npx @zitadel/cli@alpha doctor` |
81-
| Stop local Zitadel, keeping data | `npx @zitadel/cli@alpha stop` |
82-
| Delete local Zitadel data | `npx @zitadel/cli@alpha reset --force` |
78+
| Check local runtime prerequisites | `npx @zitadel/cli@preview doctor` |
79+
| Start local Zitadel | `npx @zitadel/cli@preview start` |
80+
| Add auth to Next.js | `npx @zitadel/cli@preview setup --framework next --server local` |
81+
| Check generated app files | `npx @zitadel/cli@preview doctor` |
82+
| Stop local Zitadel, keeping data | `npx @zitadel/cli@preview stop` |
83+
| Delete local Zitadel data | `npx @zitadel/cli@preview reset --force` |
8384

8485
`corepack pnpm run server` is a repository contributor command that runs the Go
8586
server from source. `zitadel start` is a published product CLI command that
@@ -213,7 +214,8 @@ For customer-local runtime workflows, agents should prefer
213214
- User-visible changes to a public npm package need a changeset. The public
214215
packages are `@zitadel/cli` (`apps/cli/`), `@zitadel/api`,
215216
`@zitadel/components`, `@zitadel/sdk-core`, `@zitadel/sdk-next`, and
216-
`@zitadel/sdk-nuxt`. CI fails a PR that touches them without one
217+
`@zitadel/sdk-nuxt`, `@zitadel/sdk-react`, `@zitadel/sdk-vue`, and
218+
`@zitadel/sdk-angular`. CI fails a PR that touches them without one
217219
(`changeset-check` in `.github/workflows/ci.yml`).
218220
- Add a changeset by writing the file directly — do not depend on the
219221
interactive `pnpm changeset` prompt. Create `.changeset/<short-slug>.md`:
@@ -227,9 +229,9 @@ For customer-local runtime workflows, agents should prefer
227229
```
228230

229231
List only public package names; pick `patch` (fixes), `minor` (features), or
230-
`major` (breaking). The repo is in `alpha` prerelease mode
231-
(`.changeset/pre.json`), so versions cut as `X.Y.Z-alpha.N` automatically — no
232-
extra action needed.
232+
`major` (breaking). The repo is in `alpha` prerelease mode for version
233+
suffixes (`.changeset/pre.json`), while npm publishing uses the `preview`
234+
dist-tag for the community-testable bundle.
233235

234236
- For changes that release nothing (docs, tests, CI, chores), add an empty
235237
changeset: `corepack pnpm changeset --empty`.

0 commit comments

Comments
 (0)