From 5b8c1a5a5db5db39582408c9562c9969628a82b8 Mon Sep 17 00:00:00 2001 From: Mathieu2301 <21021423+Mathieu2301@users.noreply.github.com> Date: Tue, 15 Sep 2026 16:50:41 +0200 Subject: [PATCH] fix: tag CLI prereleases explicitly --- .github/workflows/release.yml | 9 ++++++--- bun.lock | 2 +- packages/cli/package.json | 7 ++++--- packages/cli/src/version.ts | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2d9c394..d24ec11 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,10 +42,12 @@ jobs: cli-v*) tag="${GITHUB_REF_NAME#cli-v}" package_dir="./packages/cli" + dist_tag="latest" ;; v*) tag="${GITHUB_REF_NAME#v}" package_dir="." + dist_tag="next" ;; *) echo "Unsupported release tag $GITHUB_REF_NAME" >&2 @@ -58,12 +60,13 @@ jobs: exit 1 fi echo "package_dir=$package_dir" >> "$GITHUB_OUTPUT" + echo "dist_tag=$dist_tag" >> "$GITHUB_OUTPUT" - name: Publish to npm if: github.event_name == 'push' - # The dist-tag comes from publishConfig in package.json, so alpha - # releases land on `next` and never move `latest`. - run: npm publish "${{ steps.release.outputs.package_dir }}" --provenance --access public + # The tag namespace selects the package and its public dist-tag. + # CLI prereleases intentionally remain installable without --tag. + run: npm publish "${{ steps.release.outputs.package_dir }}" --tag "${{ steps.release.outputs.dist_tag }}" --provenance --access public env: # Ignored when the package uses trusted publishing; kept so the # workflow also works with a classic automation token. diff --git a/bun.lock b/bun.lock index 84f6111..2936597 100644 --- a/bun.lock +++ b/bun.lock @@ -18,7 +18,7 @@ }, "packages/cli": { "name": "@miakapp/cli", - "version": "4.0.0-alpha.2", + "version": "4.0.0-alpha.3", "bin": { "miakapp": "./bin/miakapp.js", }, diff --git a/packages/cli/package.json b/packages/cli/package.json index c1fdd74..6d6f04f 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@miakapp/cli", - "version": "4.0.0-alpha.2", + "version": "4.0.0-alpha.3", "description": "Agent-first Miakapp command line: check, build, publish, activate and roll back home components", "type": "module", "engines": { @@ -8,7 +8,7 @@ "node": ">=22.9" }, "bin": { - "miakapp": "./bin/miakapp.js" + "miakapp": "bin/miakapp.js" }, "files": [ "assets", @@ -30,7 +30,8 @@ "directory": "packages/cli" }, "publishConfig": { - "access": "public" + "access": "public", + "tag": "latest" }, "keywords": [ "Miakapp", diff --git a/packages/cli/src/version.ts b/packages/cli/src/version.ts index a28217c..f3f814f 100644 --- a/packages/cli/src/version.ts +++ b/packages/cli/src/version.ts @@ -12,4 +12,4 @@ */ export const PACKAGE_NAME = '@miakapp/cli'; -export const CLI_VERSION = '4.0.0-alpha.2'; +export const CLI_VERSION = '4.0.0-alpha.3';