Skip to content

Commit

Permalink
build: push release branch before creating a PR
Browse files Browse the repository at this point in the history
  • Loading branch information
chillleader committed Oct 10, 2023
1 parent 472040d commit b620f31
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions .github/workflows/CREATE_RELEASE_BRANCH.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,11 @@ jobs:
distribution: 'temurin'
java-version: '17'

- name: Configure git user
run: |
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Create branch
id: create-branch
run: |
MINOR_VERSION=${RELEASE_VERSION%.*}
git checkout -b release/${MINOR_VERSION}
git push --set-upstream origin release/${MINOR_VERSION}
echo "branchName=release/${RELEASE_VERSION%.*}" >> $GITHUB_OUTPUT
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}

- name: Set snapshot version on release branch
run: |
MINOR_VERSION=${RELEASE_VERSION%.*}
git checkout release/${MINOR_VERSION}
mvn -B versions:set -DnewVersion=${RELEASE_VERSION}-SNAPSHOT -DgenerateBackupPoms=false -f parent
echo "branchName=release/${RELEASE_VERSION%.*}" >> $GITHUB_OUTPUT
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}

Expand Down

0 comments on commit b620f31

Please sign in to comment.