Repository navigation
fix(cd): open a pull request that updates yarn.lock after the npm release - #1648
Merged
Merged
Conversation
…ease release.sh bumps the optionalDependencies in npm/git-cliff/package.json, but yarn.lock can only be regenerated once the platform packages exist on npm. Add a job after publish-npm that regenerates the lockfile on the default branch and opens a pull request with it, so that the immutable `yarn install` in CI (Check NodeJS tarball) stops failing after releases. Closes orhun#1266 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…m release Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1648 +/- ##
=======================================
Coverage 53.21% 53.21%
=======================================
Files 28 28
Lines 2633 2633
=======================================
Hits 1401 1401
Misses 1232 1232
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
8 of 12 tasks
|
Congrats on merging your first pull request! ⛰️ |
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.
Description
Adds an
update-yarn-lockjob tocd.ymlthat runs afterpublish-npm. It checks out the default branch, runsyarn install --mode=update-lockfileinnpm/git-cliff, and opens a pull request with the regeneratedyarn.lock(viapeter-evans/create-pull-request, SHA-pinned like the other actions).RELEASE.mdgets the matching step.Motivation and Context
release.shbumps theoptionalDependenciesinnpm/git-cliff/package.json, butyarn.lockcannot be regenerated at that point: the platform packages only exist on npm oncecd.ymlhas published them. Since the v2.14.0 release commit (94b313a, 2026-09-01)yarn.lockstill pinsgit-cliff-*@2.13.1whilepackage.jsonsays2.14.2, so the immutableyarn installin theCheck NodeJS tarballjob has failed on everymainrun since (17 runs; latest https://github.com/orhun/git-cliff/actions/runs/35479961040:YN0028: The lockfile would have been modified by this install, which is explicitly forbidden.). Releases themselves are unaffected becausepublish-npmsetsYARN_ENABLE_IMMUTABLE_INSTALLS: false.This is the approach agreed in #1266 ("I'd be fine to update the lock file after the release and automate that with a PR workflow (triggered by the cd workflow)"). Closes #1266.
Two things to know:
GitHub Actions is not permitted to create or approve pull requests(fork run https://github.com/glaziermag/git-cliff/actions/runs/36051427711).GITHUB_TOKENdo not trigger CI (GitHub restriction). Closing and reopening the PR runs it, or a PAT can be passed through the action'stoken:input.How Has This Been Tested?
CI=true yarn installinnpm/git-cliffexits 1 withYN0028(six platform packages 2.13.1 → 2.14.2).yarn install --mode=update-lockfilewith immutable installs off changesyarn.lockby +24/−24 lines, after which the immutable install passes.workflow_dispatch: run https://github.com/glaziermag/git-cliff/actions/runs/36051572003 opened chore(npm): update yarn.lock for main glaziermag/git-cliff#1, touching onlynpm/git-cliff/yarn.lock(+24/−24).Types of Changes
Checklist:
ubuntu-22.04, Node 18, as in the sibling jobs).cargo test: not applicable, no Rust changes.🤖 Generated with Claude Code