-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #874 from hkad98/jkd/releasing
fix: release does not contain bumped version
- Loading branch information
Showing
1 changed file
with
10 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,22 +46,30 @@ jobs: | |
- name: Bump version in codebase | ||
run: | | ||
make release-ci VERSION=${{ steps.bump.outputs.new_version }} | ||
- name: Specify release branch | ||
run: | | ||
if [ "${{ github.event.inputs.bump_type }}" == "patch" ]; then | ||
RELEASE_BRANCH="patch/${{ steps.bump.outputs.new_version }}" | ||
else | ||
RELEASE_BRANCH="rel/${{ steps.bump.outputs.new_version }}" | ||
fi | ||
echo "release_branch=$RELEASE_BRANCH" >> $GITHUB_OUTPUT | ||
- name: Commit version bump and push to custom branch | ||
id: commit | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
message: "Bump to ${{ steps.bump.outputs.new_version }}" | ||
committer_name: GitHub Actions | ||
committer_email: [email protected] | ||
new_branch: "release/${{ steps.bump.outputs.new_version }}" | ||
new_branch: ${{ steps.bump.outputs.release_branch }} | ||
- name: Create PR with the version bump | ||
id: pr | ||
if: ${{ steps.commit.outputs.pushed == 'true' }} | ||
run: | | ||
PR_URL=$(gh pr create \ | ||
--title "[bot] bump to ${{ steps.bump.outputs.new_version }}" \ | ||
--body ":rocket: Automated PR to bump to ${{ steps.bump.outputs.new_version }}." \ | ||
--base master --head "release/${{ steps.bump.outputs.new_version }}") | ||
--base master --head ${{ steps.bump.outputs.release_branch }}) | ||
PR_NUMBER=$(basename $PR_URL) | ||
echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT | ||
env: | ||
|
@@ -73,34 +81,6 @@ jobs: | |
gh pr merge ${{ steps.pr.outputs.pr_number }} --merge --auto | ||
env: | ||
GH_TOKEN: ${{ secrets.TOKEN_GITHUB_YENKINS_ADMIN }} | ||
- name: Wait for PR to be merged | ||
run: | | ||
while true; do | ||
PR_MERGED=$(gh api repos/gooddata/gooddata-python-sdk/pulls/${{ steps.pr.outputs.pr_number }} | jq .merged) | ||
if [ "$PR_MERGED" = "true" ]; then | ||
echo "PR has been merged!" | ||
break | ||
else | ||
echo "PR is not yet merged. Waiting..." | ||
sleep 10 | ||
fi | ||
done | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
create-release-branch: | ||
needs: | ||
- bump-version | ||
runs-on: ubuntu-latest | ||
if: "${{ github.event.inputs.bump_type != 'patch' }}" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Create documentation rel/${{ github.event.inputs.bump_type }} branch | ||
run: | | ||
git config user.name GitHub Actions | ||
git config user.email [email protected] | ||
git checkout -b rel/${{ needs.bump-version.outputs.new_version }} | ||
git push origin rel/${{ needs.bump-version.outputs.new_version }} | ||
# TODO: this part waits for docs build and publish optimization it takes too long (~15 minutes) | ||
# trigger-release: | ||
# needs: | ||
|