Skip to content

feat: promote npm edge tag to latest when prerelease is promoted#82

Merged
AaronFeledy merged 3 commits into
mainfrom
feature/promote-edge-on-edit
Feb 20, 2026
Merged

feat: promote npm edge tag to latest when prerelease is promoted#82
AaronFeledy merged 3 commits into
mainfrom
feature/promote-edge-on-edit

Conversation

@AaronFeledy
Copy link
Copy Markdown
Member

@AaronFeledy AaronFeledy commented Feb 20, 2026

Problem

When a release is published as a prerelease, it gets tagged as edge on npm. Later, when the release is promoted to a full release in GitHub, the npm latest tag doesn't update because the workflow only triggered on published.

Solution

  • Added released to the release workflow trigger types
  • New lightweight promote job that only runs npm dist-tag add latest — no install, no lint, no tests, no re-publish
  • Only fires on the released event (when a prerelease is promoted to full release)
  • Existing deploy job is now explicitly gated to published events only (no behavior change)
  • Uses TAG_NAME env var instead of direct interpolation to prevent script injection

Flow

  1. Publish as prerelease → full pipeline runs, publishes with edge tag (unchanged)
  2. Promote release → uncheck prerelease → promote job runs, points latest to that version (~15s)

The dist-tag add command is idempotent, so if both published and released fire on a fresh non-prerelease publish, the redundant promote is harmless.


Note

Low Risk
CI-only change that adjusts GitHub Actions triggers and adds an npm dist-tag update step; main risk is mis-tagging latest if release/tag metadata is unexpected.

Overview
Updates the release workflow to trigger on both published and released events, so promoting a GitHub prerelease to a full release is handled.

Adds a lightweight promote job that runs only on released to move the npm latest dist-tag to the version from github.event.release.tag_name, and gates the existing deploy publish pipeline to run only on published.

Written by Cursor Bugbot for commit ac02075. This will update automatically on new commits. Configure here.

Adds test infrastructure for nginx backends feature (issue #5).
This allows an nginx service to declare upstream backend services
that it depends on and can proxy to.

Tests will fail until the backends config option is implemented.
Adds a 'backends' array config to the nginx service builder.
When specified, it:
- Adds depends_on entries ensuring backend services start first
- Injects LANDO_NGINX_BACKENDS env var with comma-separated service names
- Fully backwards compatible (defaults to empty array)

Closes #5
@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 20, 2026

Deploy Preview for lando-nginx failed. Why did it fail? →

Name Link
🔨 Latest commit ac02075
🔍 Latest deploy log https://app.netlify.com/projects/lando-nginx/deploys/6997dc5d9624a10008c63079

Adds a 'released' trigger to the release workflow with a lightweight 'promote' job that runs npm dist-tag to move 'latest' to the current version when a prerelease is promoted to a full release. The existing publish pipeline remains gated to 'published' events only.
@AaronFeledy AaronFeledy force-pushed the feature/promote-edge-on-edit branch from 25d59a7 to ac02075 Compare February 20, 2026 04:00
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is ON. A Cloud Agent has been kicked off to fix the reported issue.

echo "::notice title=Promoted $VERSION to latest::The latest tag now points to $VERSION (was edge-only)"
env:
TAG_NAME: ${{ github.event.release.tag_name }}
NODE_AUTH_TOKEN: ${{secrets.NPM_DEPLOY_TOKEN}}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Race condition: promote fails before deploy publishes package

Medium Severity

When a release is created directly as a non-prerelease, GitHub fires both published and released events as separate workflow runs. The promote job (~15s) will complete well before the deploy job (minutes of install/lint/test/publish), so npm dist-tag add will fail because the version doesn't exist on npm yet. The PR description claims this is "harmless" assuming idempotency, but dist-tag add for a nonexistent version is an error, not a no-op, producing a confusing red workflow run.

Additional Locations (1)

Fix in Cursor Fix in Web

@AaronFeledy AaronFeledy merged commit 7f0626a into main Feb 20, 2026
36 of 40 checks passed
@AaronFeledy AaronFeledy deleted the feature/promote-edge-on-edit branch February 20, 2026 04:35
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.

1 participant