generated from redhat-developer/new-project-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove step to create PR to update version to next one
Signed-off-by: Denis Golovin <[email protected]>
- Loading branch information
Showing
1 changed file
with
0 additions
and
24 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 |
---|---|---|
|
@@ -74,30 +74,6 @@ jobs: | |
name: ${{ steps.TAG_UTIL.outputs.githubTag }} | ||
draft: true | ||
prerelease: false | ||
- name: Create the PR to bump the version in the main branch (only if we're tagging from main branch) | ||
if: ${{ github.event.inputs.branch == 'main' }} | ||
run: | | ||
git config --local user.name ${{ github.actor }} | ||
git config --local user.email "[email protected]" | ||
CURRENT_VERSION=$(echo "${{ steps.TAG_UTIL.outputs.extVersion }}") | ||
tmp=${CURRENT_VERSION%.*} | ||
minor=${tmp#*.} | ||
bumpedVersion=${CURRENT_VERSION%%.*}.$((minor + 1)).0 | ||
bumpedBranchName="bump-to-${bumpedVersion}" | ||
git checkout -b "${bumpedBranchName}" | ||
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${bumpedVersion}-next\",#g" package.json | ||
git add package.json | ||
git commit -s --amend -m "chore: bump version to ${bumpedVersion}" | ||
git push origin "${bumpedBranchName}" | ||
echo -e "📢 Bump version to ${bumpedVersion}\n\n${{ steps.TAG_UTIL.outputs.extVersion }} has been released.\n\n Time to switch to the new ${bumpedVersion} version 🥳" > /tmp/pr-title | ||
pullRequestUrl=$(gh pr create --title "chore: 📢 Bump version to ${bumpedVersion}" --body-file /tmp/pr-title --head "${bumpedBranchName}" --base "main") | ||
echo "📢 Pull request created: ${pullRequestUrl}" | ||
echo "➡️ Flag the PR as being ready for review" | ||
gh pr ready "${pullRequestUrl}" | ||
echo "🔅 Mark the PR as being ok to be merged automatically" | ||
gh pr merge "${pullRequestUrl}" --auto --rebase | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build: | ||
needs: [tag] | ||
|