Skip to content

Commit

Permalink
Merge pull request #875 from gooddata/snapshot-master-925e7dbd-to-rel…
Browse files Browse the repository at this point in the history
…/dev

[bot] Merge master/925e7dbd into rel/dev
  • Loading branch information
yenkins-admin authored Nov 11, 2024
2 parents 309dfb0 + 925e7db commit b7265d2
Showing 1 changed file with 10 additions and 30 deletions.
40 changes: 10 additions & 30 deletions .github/workflows/bump-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit b7265d2

Please sign in to comment.