Skip to content

Commit bc5c801

Browse files
committed
update release gha
1 parent c2869b2 commit bc5c801

1 file changed

Lines changed: 22 additions & 11 deletions

File tree

.github/workflows/release_central.yml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ on:
1010
description: "The version to release. Must start with the one in config/version.txt"
1111
required: true
1212
prev_version:
13-
description: "The previous version, used in the release git diff."
14-
required: true
13+
description: "The previous version, used in the release git diff."
14+
required: true
1515
next_version:
1616
description: "The next version, used to update the tags."
1717
required: true
@@ -91,15 +91,26 @@ jobs:
9191
path: elasticsearch-java
9292

9393
- run: |
94-
cd elasticsearch-java
95-
git config user.name "$GIT_USER"
96-
git config user.email "$GIT_MAIL"
97-
git tag v${{ inputs.version }}
98-
git push origin tag v${{ inputs.version }}
99-
echo ${{ inputs.next_version }} > config/version.txt
100-
sed -i '/static final String VERSION/s/".*"/"${{ inputs.next_version }}"/' java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java
101-
git commit -m "bump version" -a
102-
git push origin ${{ inputs.branch }}
94+
cd elasticsearch-java
95+
git config user.name "$GIT_USER"
96+
git config user.email "$GIT_MAIL"
97+
git tag v${{ inputs.version }}
98+
git push origin tag v${{ inputs.version }}
99+
echo ${{ inputs.next_version }} > config/version.txt
100+
sed -i '/static final String VERSION/s/".*"/"${{ inputs.next_version }}"/' java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java
101+
# git commit -m "bump version" -a
102+
# git push origin ${{ inputs.branch }}
103+
# temporarily pushing bump version changes to PR until support for ephemeral token is complete
104+
target_branch="version-bump-to-${{ inputs.next_version }}"
105+
git checkout -B "$target_branch"
106+
git add -A
107+
git commit -m "bump version"
108+
git push --force origin "$target_branch"
109+
gh pr create \
110+
--head "target_branch" \
111+
--base "${{ inputs.branch }}" \
112+
--title "Bump version from ${{ inputs.prev_version }} to ${{ inputs.next_version }}" \
113+
--body "As titled."
103114
104115
- name: Creates new github release with version ${{ inputs.version }}
105116
uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)