Modernize workflow caching and cleanup - #1076
Merged
Merged
Conversation
package-build.yml: add actions/setup-node@v4 with npm caching before the npm ci/build steps - previously there was no Node setup at all, so builds relied on whatever Node version happened to be preinstalled on the windows-latest image, unpinned and uncached. Both workflows: add a concurrency group so superseded runs on the same PR/branch get cancelled instead of queuing up. dotnet-build.yml: drop the unused pull-requests: write permission (nothing in the workflow writes to a PR) and the dead out_folder env var (same unused-var pattern fixed in package-build.yml previously). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
5 tasks
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.
Summary
Stacked on #1074 (adds this on top of the already-fixed package-build.yml).
actions/setup-node@v4(pinned to Node 24,cache: npmkeyed onusync-assets/package-lock.json) before thenpm ci/npm run buildsteps. Previously there was no Node setup step at all — builds relied on whatever Node version happened to be preinstalled on thewindows-latestrunner image, unpinned and with no dependency cache.concurrencygroup so a new push/PR update cancels a superseded in-flight run instead of letting it finish and queuing behind it — same pattern already applied to the CodeQL workflow.pull-requests: writepermission (nothing in the workflow writes to a PR) and the deadout_folderenv var (same unused-variable pattern that was fixed in package-build.yml).Note on concurrency + nightly publish
package-build.yml's concurrency group can cancel an in-flight nightly-feed publish if another push lands onv17/mainbefore it finishes. Each run publishes under a uniquenightly_version(build number), so a cancelled run just means that specific nightly build doesn't make it to the feed — no partial/corrupt package state. Flagging it in case that trade-off isn't wanted.Test plan
npm cicache hits on the next nightly build run🤖 Generated with Claude Code