Skip to content

Commit 69710f0

Browse files
authored
Merge pull request #886 from hkad98/jkd/releasing
feat: update commit and push of release commit
2 parents 3a7e4a4 + c97bc4b commit 69710f0

File tree

1 file changed

+14
-26
lines changed

1 file changed

+14
-26
lines changed

.github/workflows/bump-version.yaml

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,32 @@ jobs:
2828
uses: actions/checkout@v4
2929
with:
3030
token: ${{ secrets.TOKEN_GITHUB_YENKINS_ADMIN }} # needed to push to the protected branch
31+
3132
- uses: actions/setup-python@v5
3233
with:
3334
python-version-file: '.python-version'
3435
cache: 'pip'
3536
cache-dependency-path: |
3637
release-requirements.txt
38+
3739
- name: Install dependencies
3840
run: |
3941
pip install -r release-requirements.txt
42+
4043
- name: Bump version
4144
id: bump
4245
run: |
4346
NEW_VERSION=$(python ./scripts/bump_version.py ${{ github.event.inputs.bump_type }})
4447
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
48+
4549
- name: Bump version in documentation
4650
run: |
4751
python scripts/bump_doc_dependencies.py ${{ steps.bump.outputs.new_version }}
52+
4853
- name: Bump version in codebase
4954
run: |
5055
make release-ci VERSION=${{ steps.bump.outputs.new_version }}
56+
5157
- name: Specify release branch
5258
run: |
5359
if [ "${{ github.event.inputs.bump_type }}" == "patch" ]; then
@@ -56,33 +62,15 @@ jobs:
5662
RELEASE_BRANCH="rel/${{ steps.bump.outputs.new_version }}"
5763
fi
5864
echo "release_branch=$RELEASE_BRANCH" >> $GITHUB_OUTPUT
59-
- name: Commit version bump and push to custom branch
60-
id: commit
61-
uses: EndBug/add-and-commit@v9
62-
with:
63-
message: "Bump to ${{ steps.bump.outputs.new_version }}"
64-
committer_name: GitHub Actions
65-
committer_email: github-actions@github.com
66-
new_branch: ${{ steps.bump.outputs.release_branch }}
67-
- name: Create PR with the version bump
68-
id: pr
69-
if: ${{ steps.commit.outputs.pushed == 'true' }}
70-
run: |
71-
PR_URL=$(gh pr create \
72-
--title "[bot] bump to ${{ steps.bump.outputs.new_version }}" \
73-
--body ":rocket: Automated PR to bump to ${{ steps.bump.outputs.new_version }}." \
74-
--base master --head ${{ steps.bump.outputs.release_branch }})
75-
PR_NUMBER=$(basename $PR_URL)
76-
echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT
77-
env:
78-
GH_TOKEN: ${{ secrets.TOKEN_GITHUB_YENKINS }}
79-
- name: Approve the PR as yenkins-admin
80-
if: ${{ steps.commit.outputs.pushed == 'true' }}
65+
66+
- name: Create and push the new version ${{steps.bump.outputs.new_version}}
8167
run: |
82-
gh pr review ${{ steps.pr.outputs.pr_number }} --approve
83-
gh pr merge ${{ steps.pr.outputs.pr_number }} --merge --auto
84-
env:
85-
GH_TOKEN: ${{ secrets.TOKEN_GITHUB_YENKINS_ADMIN }}
68+
git config user.name github-actions
69+
git config user.email github-actions@github.com
70+
git add -A
71+
git commit -m "Bump to ${{steps.bump.outputs.new_version}}"
72+
git push origin master ${{ steps.bump.outputs.release_branch }}
73+
8674
# TODO: this part waits for docs build and publish optimization it takes too long (~15 minutes)
8775
# trigger-release:
8876
# needs:

0 commit comments

Comments
 (0)