diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 032ba6de..4e350d3d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,14 @@ on: required: false type: string +# One run per branch (and event): a newer push cancels the older run, so on basic / v2 the +# "latest" release always gets the build of the newest commit, not of the run that finished +# last (#90). Every manual run has a group of its own: never cancelled, never replaced by +# another manual run waiting in the same group. +concurrency: + group: ${{ github.event_name == 'workflow_dispatch' && format('manual-{0}', github.run_id) || format('build-{0}-{1}', github.event_name, github.ref) }} + cancel-in-progress: ${{ github.event_name != 'workflow_dispatch' }} + jobs: # Unit tests and lint; also runs for pull requests from forks (no secrets needed) test: