Repository navigation
Conversation
Replaces the SKIP_BUILD condition on every build step with a job-level condition: `resolve` computes the version, build branch, and fingerprint and looks up an existing build; `build` only runs on a miss; `package` uploads the build commit either way. The concurrency lock moves to the workflow level and is keyed on the build branch only, so lookup, build, and push stay serialized across jobs. This also fixes a pre-existing race where two different commits pushed to the same build branch concurrently. Behaviour changes: - The artifact is created from the build commit, so it contains exactly the committed files on both the fresh and the reused path. - ENV_VARS are applied in the build job only. - A newly queued run cancels a pending run for the same build branch.
# Conflicts: # docs/build-and-distribute.md
# Conflicts: # .github/workflows/build-and-distribute.yml
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.
Why
After the fingerprint change, a cache hit still flowed through a single job in which 13 steps carried an
env.SKIP_BUILD != 'true'condition. This PR replaces those step conditions with a single job-level condition.Changes
resolve: determines the package version and build branch, validates the branch strategy, computes the fingerprint, and searches the build branch history. It outputsbuild-commiton a hit.build: runs only on a miss (if: needs.resolve.outputs.build-commit == ''). Same steps as before, with noSKIP_BUILDconditions.package: checks out the build commit (fresh or reused), stages it, and uploads the artifact. It sets theartifactandbuild-commitworkflow outputs.Behaviour changes
node_moduleswithout a.distignore), while a reused build didn't.ENV_VARSis applied in thebuildjob only, so it no longer affects version detection.dev/main) unlessBUILT_BRANCH_NAMEis set, because expressions can't strip thedev/prefix.Reviewing
Most of the diff is moved code:
Testing