Skip to content

Conversation

Copy link

Copilot AI commented Jan 28, 2026

Overview

Migrated from Lerna to NX Release. Production releases use Version Plans via nx.json configuration. Alpha releases use NX Release programmatic API to bypass version plans and apply prerelease versioning without git operations.

Changes:

  • script/release-alpha.mjs: New script using releaseVersion() and releasePublish() from nx/release API

    • Applies prerelease specifier with custom preid (e.g., alpha.abc123)
    • Disables git operations (gitCommit: false, gitTag: false, stageChanges: false)
    • Publishes with alpha tag to npm
  • publish-alpha.yml: Replaced bash workaround (moving .nx/version-plans) with single command:

    node script/release-alpha.mjs --preid="alpha.${SHORT_SHA}"
  • publish-production.yml: Uses nx release -y (removed --dry-run flag)

  • nx.json: Configured for production with version plans, git operations, and GitHub releases

Why programmatic API for alpha:
Version plans cannot be used with specifier arguments. The programmatic API allows direct control over versioning parameters, cleanly separating alpha (prerelease with no git ops) from production (version plans with git ops) workflows.

PR Checklist

  • Related to designs: N/A
  • Related to JIRA ticket: N/A
  • I have run this code to verify it works
  • This PR includes unit tests for the code change (N/A - infrastructure change)
  • This PR includes testing instructions tests for the code change
  • The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

Testing Instructions

Test alpha script locally:

# Dry run to verify versioning logic
node script/release-alpha.mjs --preid=alpha.test123 --dryRun

# Should version all packages as prerelease with correct dependencies

Test production release (dry run):

# Create a test version plan
echo -e "---\ngamut: patch\n---\n\nTest" > .nx/version-plans/test.md

# Verify it works
npx nx release --dry-run

# Clean up
rm .nx/version-plans/test.md

In CI:

  • Alpha builds will publish on PR open/sync with tag alpha.{SHORT_SHA}
  • Production releases will publish on merge to main using version plans

PR Links and Envs

N/A - Infrastructure change, no application changes

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://storage.googleapis.com/prod-north-america/62ebf733004c864a372a0e81/8a2df9ef-4f67-44d5-9858-c9e0e3dcef19-logs
    • Triggering command: /usr/local/bin/node node script/release-alpha.mjs --preid=alpha.test123 --dryRun (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@CLAassistant
Copy link

CLAassistant commented Jan 28, 2026

CLA assistant check
All committers have signed the CLA.

Copilot AI changed the title [WIP] Update repo to use NX release for package publishing chore: migrate from Lerna to NX Release with Version Plans Jan 28, 2026
Copilot AI requested a review from jakemhiller January 28, 2026 18:35
@codecov
Copy link

codecov bot commented Jan 28, 2026

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

@nx-cloud
Copy link

nx-cloud bot commented Jan 28, 2026

View your CI Pipeline Execution ↗ for commit 3606fad


☁️ Nx Cloud last updated this comment at 2026-01-30 14:56:11 UTC

@jakemhiller jakemhiller force-pushed the copilot/update-to-nx-release branch from a521830 to 85ce914 Compare January 28, 2026 19:48
@jakemhiller
Copy link
Member

@copilot there are problems with the CLI usage of nx release. --skipPublish and --yes are not valid options. make sure you are using the nx mcp and documentation https://nx.dev/docs/features/manage-releases to know exactly how to use nx release.

Copy link
Author

Copilot AI commented Jan 28, 2026

@copilot there are problems with the CLI usage of nx release. --skipPublish and --yes are not valid options. make sure you are using the nx mcp and documentation https://nx.dev/docs/features/manag...

Fixed in commit 49904d3. Changes made:

Production workflow:

  • Changed --yes to -y (the correct short form)

Alpha workflow:

  • Removed invalid --skipPublish flag (correct flag is --skip-publish and only works on nx release, not nx release version)
  • Removed --yes from nx release publish (not a valid flag for the publish subcommand)
  • Changed to use nx release --skip-publish prerelease --preid="alpha.{SHA}" followed by nx release publish --tag="alpha.{SHA}"
  • Added workaround to temporarily move .nx/version-plans directory during alpha builds (since version plans can't be used with a specifier argument)

Both workflows now use the correct NX Release CLI syntax per the official documentation.

Copilot AI changed the title chore: migrate from Lerna to NX Release with Version Plans chore: migrate to NX Release with programmatic API for alpha builds Jan 29, 2026
Copilot AI and others added 10 commits January 30, 2026 09:53
Co-authored-by: jakemhiller <238023+jakemhiller@users.noreply.github.com>
Co-authored-by: jakemhiller <238023+jakemhiller@users.noreply.github.com>
Co-authored-by: jakemhiller <238023+jakemhiller@users.noreply.github.com>
Co-authored-by: jakemhiller <238023+jakemhiller@users.noreply.github.com>
Co-authored-by: jakemhiller <238023+jakemhiller@users.noreply.github.com>
Co-authored-by: jakemhiller <238023+jakemhiller@users.noreply.github.com>
Co-authored-by: jakemhiller <238023+jakemhiller@users.noreply.github.com>
Co-authored-by: jakemhiller <238023+jakemhiller@users.noreply.github.com>
Co-authored-by: jakemhiller <238023+jakemhiller@users.noreply.github.com>
@jakemhiller jakemhiller force-pushed the copilot/update-to-nx-release branch from ccaa986 to 3606fad Compare January 30, 2026 14:53
@github-actions
Copy link
Contributor

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.

3 participants