If two commits are merged to main, each will trigger a separate run of the CI workflow. If, for some reason, the later commit's run completes first, then the later commit will be tagged with the next version number. The earlier commit, whose run completes second, will also be tagged with the next version number, but the earlier commit's version number will be greater than the later commit's version number, which is very confusing.
This is known as a race condition. To prevent it, we should ensure that runs are executed in sequence. To do so, we should set the workflow's concurrency property. See:
If two commits are merged to
main, each will trigger a separate run of the CI workflow. If, for some reason, the later commit's run completes first, then the later commit will be tagged with the next version number. The earlier commit, whose run completes second, will also be tagged with the next version number, but the earlier commit's version number will be greater than the later commit's version number, which is very confusing.This is known as a race condition. To prevent it, we should ensure that runs are executed in sequence. To do so, we should set the workflow's
concurrencyproperty. See: