File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -eu -o pipefail
4+
5+ BRANCH=$( git branch --show-current)
6+
7+ if ! [[ " ${BRANCH} " =~ ^RELEASE-[0-9]+\. [0-9]+$ ]]
8+ then
9+ echo ERROR: This is not a release branch!
10+ exit 1
11+ fi
12+
13+ NEW_VERSION=" $( bump-my-version show new_version --increment release) "
14+ echo " Release ${NEW_VERSION} "
15+
16+ if ! [[ " RELEASE-${NEW_VERSION} " == " ${BRANCH} " * ]]
17+ then
18+ echo ERROR: Version does not match release branch
19+ exit 1
20+ fi
21+
22+ bump-my-version bump release --commit --message " Release {new_version}" --tag --tag-name " v{new_version}" --tag-message " Release {new_version}"
23+ bump-my-version bump patch --commit
24+
25+ git push origin " ${BRANCH} " " v${NEW_VERSION} "
Original file line number Diff line number Diff line change 1+ ---
2+ name : " Tag Release"
3+
4+ on :
5+ workflow_dispatch :
6+
7+ jobs :
8+ release :
9+ name : " Release"
10+ runs-on : " ubuntu-latest"
11+ steps :
12+ - uses : " actions/checkout@v4"
13+ with :
14+ token : " ${{ secrets.RELEASE_TOKEN }}"
15+ - name : " Set up Python"
16+ uses : " actions/setup-python@v5"
17+ with :
18+ python-version : " 3.13"
19+ - name : " Install dependencies"
20+ run : |
21+ python -m pip install --upgrade pip
22+ pip install bump-my-version~=0.29.0
23+ - name : " Setup git"
24+ run : |
25+ git config user.name pulpbot
26+ git config user.email pulp-infra@redhat.com
27+ - name : " Release"
28+ run : |
29+ .ci/scripts/release.sh
30+ ...
You can’t perform that action at this time.
0 commit comments