Repository navigation
feat(library-publish): stage and prod catch up on every version dev released before - #15
Merged
Merged
Conversation
…eleased before A fast-forward promotes the commits in between too, but the promote job published only the versions the promoted commit carries: release on dev three times, promote once, and stage and prod never got the first two. A lockfile that pinned one of them on dev did not install there. Each promotion now also publishes every earlier version dev released (in GitHub Packages, lower by semver than the commit's own) that the environment's CodeArtifact lacks, oldest first, under a temporary `catch-up` tag, so `latest` never moves back. A refused earlier version is a warning the next promotion retries; prod makes their GitHub releases full releases, never "Latest". Co-Authored-By: Igor Lamos <igor@be.plus>
igorlamos
approved these changes
Oct 8, 2026
This was referenced Oct 8, 2026
igorlamos
added a commit
that referenced
this pull request
Oct 8, 2026
…test` tag (#17) The first stage promotions after #15 refused aws, cdk, config and database: "is not in GitHub Packages, so dev never released it", for versions dev's runs had published there. Called with a bare name, `npm view` answers only for the `latest` tag, and a package without one prints nothing, exit 0. dev publishes with `--tag dev`, so every package dev first published that way (aws-core, cdk-estate, cdk-release, config, the three database packages) has no `latest` in GitHub Packages, and its versions read as none. Each lookup now names a version: GitHub Packages is asked for the version the commit carries, as the promote job did before #15; CodeArtifact for `latest`, then that version, then each earlier one dev released, until one matches. A package with `latest` still costs one call a registry. Co-authored-by: bea-claude <bea+claude@be.plus> Co-authored-by: Igor Lamos <igor@be.plus>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release on dev three times, promote once, and stage and prod got only the third. The promote job published only the versions the promoted commit carries, but a fast-forward promotes the commits in between too, so an app whose lockfile pinned one of the skipped versions on dev could not install it on stage or prod.
The change (
promotejob)latestnever moves back. The earlier versions go out first, oldest first, under a temporarycatch-updist-tag that is removed afterwards. Only the commit's own version becomeslatest.--latest=false, and "Latest" is decided among the commit's own versions, as before. Onegh release listfinds the pre-releases.AWS auth now comes before the GitHub Packages read, because the job has to know what the CodeArtifact has before it knows what to fetch.
README updated.
Tested
Not run on GitHub yet. Locally, the new steps ran against stubbed
npmandgh:next.10must come afternext.3Companions
dev, so fast-forwardingstageorprodnever ran this job for them. Each now also triggers onstageandprod, as beplus/analytics already did: beplus/ai#22, beplus/api#4, beplus/auth#23, beplus/aws#6, beplus/billing#3, beplus/cdk#9, beplus/cms#45, beplus/config#6, beplus/data#15, beplus/database#9, beplus/docs#27, beplus/events#3, beplus/messaging#3, beplus/metering#3, beplus/mobile#4, beplus/npm#3, beplus/provisioning#3, beplus/pulse#3, beplus/rush#6, beplus/saas#12, beplus/schema#3, beplus/server#4, beplus/sync#3, beplus/uix#117, beplus/web#4.release.yml.After merge
v2to the merge commit.stage/prod). The first run catches each registry up.