Skip to content

Commit 925e7db

Browse files
authored
Merge pull request #874 from hkad98/jkd/releasing
fix: release does not contain bumped version
2 parents 55d7a7d + 3f112f4 commit 925e7db

File tree

1 file changed

+10
-30
lines changed

1 file changed

+10
-30
lines changed

.github/workflows/bump-version.yaml

+10-30
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,30 @@ jobs:
4646
- name: Bump version in codebase
4747
run: |
4848
make release-ci VERSION=${{ steps.bump.outputs.new_version }}
49+
- name: Specify release branch
50+
run: |
51+
if [ "${{ github.event.inputs.bump_type }}" == "patch" ]; then
52+
RELEASE_BRANCH="patch/${{ steps.bump.outputs.new_version }}"
53+
else
54+
RELEASE_BRANCH="rel/${{ steps.bump.outputs.new_version }}"
55+
fi
56+
echo "release_branch=$RELEASE_BRANCH" >> $GITHUB_OUTPUT
4957
- name: Commit version bump and push to custom branch
5058
id: commit
5159
uses: EndBug/add-and-commit@v9
5260
with:
5361
message: "Bump to ${{ steps.bump.outputs.new_version }}"
5462
committer_name: GitHub Actions
5563
committer_email: [email protected]
56-
new_branch: "release/${{ steps.bump.outputs.new_version }}"
64+
new_branch: ${{ steps.bump.outputs.release_branch }}
5765
- name: Create PR with the version bump
5866
id: pr
5967
if: ${{ steps.commit.outputs.pushed == 'true' }}
6068
run: |
6169
PR_URL=$(gh pr create \
6270
--title "[bot] bump to ${{ steps.bump.outputs.new_version }}" \
6371
--body ":rocket: Automated PR to bump to ${{ steps.bump.outputs.new_version }}." \
64-
--base master --head "release/${{ steps.bump.outputs.new_version }}")
72+
--base master --head ${{ steps.bump.outputs.release_branch }})
6573
PR_NUMBER=$(basename $PR_URL)
6674
echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT
6775
env:
@@ -73,34 +81,6 @@ jobs:
7381
gh pr merge ${{ steps.pr.outputs.pr_number }} --merge --auto
7482
env:
7583
GH_TOKEN: ${{ secrets.TOKEN_GITHUB_YENKINS_ADMIN }}
76-
- name: Wait for PR to be merged
77-
run: |
78-
while true; do
79-
PR_MERGED=$(gh api repos/gooddata/gooddata-python-sdk/pulls/${{ steps.pr.outputs.pr_number }} | jq .merged)
80-
if [ "$PR_MERGED" = "true" ]; then
81-
echo "PR has been merged!"
82-
break
83-
else
84-
echo "PR is not yet merged. Waiting..."
85-
sleep 10
86-
fi
87-
done
88-
env:
89-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90-
create-release-branch:
91-
needs:
92-
- bump-version
93-
runs-on: ubuntu-latest
94-
if: "${{ github.event.inputs.bump_type != 'patch' }}"
95-
steps:
96-
- name: Checkout
97-
uses: actions/checkout@v4
98-
- name: Create documentation rel/${{ github.event.inputs.bump_type }} branch
99-
run: |
100-
git config user.name GitHub Actions
101-
git config user.email [email protected]
102-
git checkout -b rel/${{ needs.bump-version.outputs.new_version }}
103-
git push origin rel/${{ needs.bump-version.outputs.new_version }}
10484
# TODO: this part waits for docs build and publish optimization it takes too long (~15 minutes)
10585
# trigger-release:
10686
# needs:

0 commit comments

Comments
 (0)