diff --git a/.github/workflows/cut-release.yml b/.github/workflows/cut-release.yml index 157c0ca02..878cc9d33 100644 --- a/.github/workflows/cut-release.yml +++ b/.github/workflows/cut-release.yml @@ -2,11 +2,14 @@ name: Cut Release # Promote a prepared "candidate" branch (cherry-picks + version bump # already committed) into a real release: create the canonical -# `release/v` branch, create the `v` annotated tag, and -# (on success) delete the candidate branch. +# `release/v` branch and the `v` annotated tag at the +# candidate's HEAD, atomically. # # After this runs, kick off `release-stable-all.yml` manually with the new # tag to build portable artifacts — same as previous backports. +# +# The candidate branch is left in place; clean it up manually once you've +# verified the release. on: workflow_dispatch: @@ -30,7 +33,7 @@ on: type: string default: '' dry_run: - description: 'Validate only — do not push branch, tag, or delete source' + description: 'Validate only — do not push branch or tag' required: false type: boolean default: false @@ -217,15 +220,6 @@ jobs: "${SOURCE_SHA}:refs/heads/${REL_BRANCH}" \ "refs/tags/${TAG_NAME}" - - name: Delete source branch (success only) - if: success() && inputs.dry_run != true && inputs.dry_run != 'true' - env: - GH_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }} - run: | - set -euo pipefail - AUTH_URL="https://x-access-token:${GH_TOKEN}@github.com/${REPO_FULL}.git" - git push "$AUTH_URL" --delete "refs/heads/${INPUT_SOURCE_BRANCH}" - - name: Final summary if: always() env: @@ -237,13 +231,15 @@ jobs: echo "" echo "### Result" if [ "$INPUT_DRY_RUN" = "true" ]; then - echo "🔍 **Dry run** — no branch, tag, or deletion was performed." + echo "🔍 **Dry run** — no branch or tag was created." else - echo "✅ Promoted \`$INPUT_SOURCE_BRANCH\` to \`$REL_BRANCH\` and tagged \`$TAG_NAME\`." + echo "✅ Created \`$REL_BRANCH\` and tagged \`$TAG_NAME\` from \`$INPUT_SOURCE_BRANCH\`." echo "" echo "- Branch: " echo "- Tag: " echo "" echo "Next: run [release-stable-all.yml](https://github.com/${REPO_FULL}/actions/workflows/release-stable-all.yml) with \`git_tag=${TAG_NAME}\`." + echo "" + echo "The candidate branch \`$INPUT_SOURCE_BRANCH\` was left in place; delete it manually once you've verified the release." fi } >> "$GITHUB_STEP_SUMMARY"