chore: delete the release branch after a bugfix release (#32395)
This commit is contained in:
parent
b9a1a94726
commit
b8a440e5ff
2 changed files with 39 additions and 0 deletions
35
.github/workflows/release.yml
vendored
35
.github/workflows/release.yml
vendored
|
|
@ -204,3 +204,38 @@ jobs:
|
|||
git config user.email github-actions@github.com
|
||||
git commit -am "Mirror evcc release"
|
||||
git push
|
||||
|
||||
cleanup:
|
||||
name: Delete Release Branch
|
||||
needs:
|
||||
- docker
|
||||
- apt
|
||||
runs-on: depot-ubuntu-24.04-arm
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
|
||||
# a bugfix release consumes its release branch, e.g. tag 0.313.1 is the tip
|
||||
# of release/0.313.1. Feature releases have no such branch.
|
||||
- env:
|
||||
TAG: ${{ github.ref_name }}
|
||||
run: |
|
||||
branch="release/$TAG"
|
||||
|
||||
head=$(git rev-parse --verify --quiet "origin/$branch") || {
|
||||
echo "::notice::no $branch to delete"
|
||||
exit 0
|
||||
}
|
||||
|
||||
if [ "$head" != "$(git rev-parse "$TAG^{commit}")" ]; then
|
||||
echo "::notice::$branch moved past $TAG, keeping it"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git push origin --delete "$branch"
|
||||
|
|
|
|||
|
|
@ -96,6 +96,10 @@ The commit is cherry-picked onto the branch of the next bugfix release, e.g.
|
|||
created at the newest tag of that line if it does not exist yet. Pass a branch
|
||||
name, `/backport release/0.312.2`, to service an older line.
|
||||
|
||||
Releasing a bugfix deletes its release branch, since the tag is the branch tip
|
||||
and everything on it has shipped. A branch that received further backports after
|
||||
the tag is kept.
|
||||
|
||||
## Debugging in VS Code
|
||||
|
||||
### evcc Core
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue