Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- main
- v*
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
pre-release:
name: Pre-release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/v')
environment: release
permissions:
contents: read # to checkout
Expand All @@ -31,7 +31,7 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
ref: main
ref: ${{ github.ref }}
- name: Install the latest version of uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
Expand Down Expand Up @@ -65,6 +65,7 @@ jobs:
run: |
gh auth setup-git
tag=$(git describe --tags --exact-match HEAD)
git push --atomic origin HEAD:main "refs/tags/${tag}"
git push --atomic origin "HEAD:${BRANCH}" "refs/tags/${tag}"
env:
GH_TOKEN: ${{ steps.release-token.outputs.token }}
BRANCH: ${{ github.ref_name }}
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ on:
push:
branches:
- main
- v*
pull_request:
branches:
- main
- v*
schedule:
- cron: "0 8 * * 1"
workflow_dispatch:
Expand Down
1 change: 1 addition & 0 deletions docs/changelog/1178.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The release workflows now support ``v*`` maintenance branches in addition to ``main``.
2 changes: 1 addition & 1 deletion tasks/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def main(version_str: str, *, push: bool) -> None:
tag = tag_release_commit(release_commit, repo, version)
if push:
print('push release commit')
repo.git.push(remote.name, 'HEAD:main')
repo.git.push(remote.name, f'HEAD:{repo.active_branch.name}')
print('push release tag')
repo.git.push(remote.name, tag)
print('All done! ✨ 🍰 ✨')
Expand Down
Loading