From 71705550ff57552df53407be615696261446245f Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sat, 29 Jun 2024 22:31:50 +0100 Subject: [PATCH] ci: prevent more than one release from occurring at same time --- .github/workflows/ci.yml | 4 ++++ .github/workflows/release-pr.yml | 4 +++- .github/workflows/release.yml | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbee068a15..11fd4b5c03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -256,6 +256,8 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} build-release: + concurrency: + group: release permissions: id-token: write if: | @@ -297,6 +299,8 @@ jobs: NPM_CONFIG_PROVENANCE: true release-pr: + concurrency: + group: release permissions: id-token: write pull-requests: write diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index f652d7684e..3509c8075b 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -14,6 +14,8 @@ permissions: jobs: release-pr: if: github.repository == 'nuxt/nuxt' && github.event.issue.pull_request && github.event.comment.body == '/trigger release' + concurrency: + group: release permissions: id-token: write pull-requests: write @@ -44,7 +46,7 @@ jobs: if [[ $(date -d "$updated_at" +%s) -gt $(date -d "$COMMENT_AT" +%s) ]]; then exit 1 fi - + echo "head_sha=$head_sha" >> $GITHUB_OUTPUT - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d43ba94276..7d3d86ce06 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,8 @@ permissions: {} jobs: release: if: github.repository == 'nuxt/nuxt' && (startsWith(github.event.head_commit.message, 'v3.') || startsWith(github.event.head_commit.message, 'v4.')) + concurrency: + group: release permissions: id-token: write runs-on: ubuntu-latest