From ba418a851803d21b1dd7acbde013a0c4054e95c2 Mon Sep 17 00:00:00 2001 From: Shantur Rathore Date: Fri, 13 Feb 2026 00:39:14 +0000 Subject: [PATCH] chore(release): publish dev builds as codenomad-dev Switch dev workflow to publish the server under @neuralnomads/codenomad-dev with dist-tag latest, avoiding @dev dist-tags. Add workflow input to override package name at publish time. --- .github/workflows/dev-release.yml | 3 ++- .github/workflows/manual-npm-publish.yml | 20 ++++++++++++++++++-- .github/workflows/release.yml | 1 + .github/workflows/reusable-release.yml | 6 ++++++ README.md | 2 +- 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml index b7bb5d18..4fdc3c0f 100644 --- a/.github/workflows/dev-release.yml +++ b/.github/workflows/dev-release.yml @@ -34,7 +34,8 @@ jobs: uses: ./.github/workflows/reusable-release.yml with: version_suffix: ${{ needs.prepare.outputs.version_suffix }} - dist_tag: dev + npm_package_name: "@neuralnomads/codenomad-dev" + dist_tag: latest prerelease: true release_ui: false secrets: inherit diff --git a/.github/workflows/manual-npm-publish.yml b/.github/workflows/manual-npm-publish.yml index b67f71fe..81d93fd1 100644 --- a/.github/workflows/manual-npm-publish.yml +++ b/.github/workflows/manual-npm-publish.yml @@ -12,6 +12,11 @@ on: required: false default: dev type: string + package_name: + description: "Package name to publish (e.g. @neuralnomads/codenomad-dev)" + required: false + default: "@neuralnomads/codenomad" + type: string workflow_call: inputs: version: @@ -21,6 +26,10 @@ on: required: false type: string default: dev + package_name: + required: false + type: string + default: "@neuralnomads/codenomad" secrets: NPM_TOKEN: required: false @@ -54,7 +63,7 @@ jobs: run: npm install @rollup/rollup-linux-x64-gnu --no-save - name: Build server package (includes UI bundling) - run: npm run build --workspace @neuralnomads/codenomad + run: npm run build --workspace packages/server - name: Set publish metadata shell: bash @@ -65,10 +74,17 @@ jobs: fi echo "VERSION=$VERSION_INPUT" >> "$GITHUB_ENV" echo "DIST_TAG=${{ inputs.dist_tag || 'dev' }}" >> "$GITHUB_ENV" + echo "PACKAGE_NAME=${{ inputs.package_name }}" >> "$GITHUB_ENV" - name: Bump package version for publish run: npm version ${VERSION} --workspaces --include-workspace-root --no-git-tag-version --allow-same-version + - name: Set server package name for publish + shell: bash + run: | + set -euo pipefail + node -e "const fs=require('fs'); const path=require('path'); const p=path.join('packages','server','package.json'); const j=JSON.parse(fs.readFileSync(p,'utf8')); j.name=process.env.PACKAGE_NAME || j.name; fs.writeFileSync(p, JSON.stringify(j, null, 2)+'\n'); console.log('Publishing as', j.name);" + - name: Publish server package with provenance env: # Optional: when present, npm will use token auth. @@ -85,4 +101,4 @@ jobs: else echo "Using NPM_TOKEN authentication" fi - npm publish --workspace @neuralnomads/codenomad --access public --tag ${DIST_TAG} --provenance + npm publish --workspace packages/server --access public --tag ${DIST_TAG} --provenance diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dfd07e8e..0ce704b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,4 +14,5 @@ jobs: uses: ./.github/workflows/reusable-release.yml with: dist_tag: latest + npm_package_name: "@neuralnomads/codenomad" secrets: inherit diff --git a/.github/workflows/reusable-release.yml b/.github/workflows/reusable-release.yml index 460aa7d5..c34959ba 100644 --- a/.github/workflows/reusable-release.yml +++ b/.github/workflows/reusable-release.yml @@ -13,6 +13,11 @@ on: required: false default: dev type: string + npm_package_name: + description: "npm package name to publish (defaults to server package name)" + required: false + default: "" + type: string prerelease: description: "Create GitHub prerelease" required: false @@ -100,4 +105,5 @@ jobs: with: version: ${{ needs.prepare-release.outputs.version }} dist_tag: ${{ inputs.dist_tag }} + package_name: ${{ inputs.npm_package_name }} secrets: inherit diff --git a/README.md b/README.md index f1f7c4bc..9276ad4c 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ npx @neuralnomads/codenomad --launch For dev version ```bash -npx @neuralnomads/codenomad@dev --launch +npx @neuralnomads/codenomad-dev --launch ``` Dev builds are published as GitHub pre-releases: