Allow concurrent release builds while serializing publication (#51198)

## Why

Release builds for different tags can run concurrently, but publication must remain serialized so channel checks and updates cannot race or move release pointers backward.

## What changed

Scope workflow concurrency to `${{ github.workflow }}-${{ github.ref }}`. Keep `release`, `publish-r2`, `publish-npm`, `winget`, and `update-branch` on a shared `rust-release` concurrency group with `queue: max` and `cancel-in-progress: false`.

GitOrigin-RevId: 75b42fd765db6091fb9190aae2ecccd2bb959d08
This commit is contained in:
andrewgu-oai
2026-10-05 23:09:09 +00:00
committed by copyberry
parent a6c5f3a9fa
commit 54dd21741d
+13 -1
View File
@@ -19,8 +19,10 @@ env:
CODEX_ZSH_RELEASE_TAG: codex-zsh-v0.1.0 CODEX_ZSH_RELEASE_TAG: codex-zsh-v0.1.0
CODEX_ZSH_MANIFEST_SHA256: c534eab89dcea7e3d8a5e5b3f49c025c7c64cd4e4d9814ee24871de58a9359a1 CODEX_ZSH_MANIFEST_SHA256: c534eab89dcea7e3d8a5e5b3f49c025c7c64cd4e4d9814ee24871de58a9359a1
# The launcher uses this per-tag group as the migration boundary. Keep shared
# publication jobs on the original queued group below when changing this.
concurrency: concurrency:
group: ${{ github.workflow }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false cancel-in-progress: false
jobs: jobs:
@@ -1531,6 +1533,12 @@ jobs:
if-no-files-found: error if-no-files-found: error
release: release:
# Each job checks its channel under this lock; out-of-order builds cannot
# roll back GitHub, npm, R2, or the canary branch.
concurrency: &release-publication
group: rust-release
queue: max
cancel-in-progress: false
needs: needs:
- tag-check - tag-check
- build - build
@@ -1714,6 +1722,7 @@ jobs:
stage: assets stage: assets
publish-r2: publish-r2:
concurrency: *release-publication
name: publish-r2 name: publish-r2
needs: [release, publish-dotslash, publish-r2-assets] needs: [release, publish-dotslash, publish-r2-assets]
if: >- if: >-
@@ -1768,6 +1777,7 @@ jobs:
# July 31, 2025: https://github.blog/changelog/2025-07-31-npm-trusted-publishing-with-oidc-is-generally-available/ # July 31, 2025: https://github.blog/changelog/2025-07-31-npm-trusted-publishing-with-oidc-is-generally-available/
# npm docs: https://docs.npmjs.com/trusted-publishers # npm docs: https://docs.npmjs.com/trusted-publishers
publish-npm: publish-npm:
concurrency: *release-publication
# Publish to npm for stable releases, numbered alphas, and alpha hotfixes. # Publish to npm for stable releases, numbered alphas, and alpha hotfixes.
if: >- if: >-
${{ ${{
@@ -1966,6 +1976,7 @@ jobs:
fi fi
winget: winget:
concurrency: *release-publication
name: winget name: winget
needs: release needs: release
# Only publish stable/mainline releases to WinGet; pre-releases include a # Only publish stable/mainline releases to WinGet; pre-releases include a
@@ -2027,6 +2038,7 @@ jobs:
komac cleanup --only-merged komac cleanup --only-merged
update-branch: update-branch:
concurrency: *release-publication
name: Update latest-alpha-cli branch name: Update latest-alpha-cli branch
if: >- if: >-
${{ ${{