|
10 | 10 | description: "The version to release. Must start with the one in config/version.txt" |
11 | 11 | required: true |
12 | 12 | 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 |
15 | 15 | next_version: |
16 | 16 | description: "The next version, used to update the tags." |
17 | 17 | required: true |
@@ -91,15 +91,26 @@ jobs: |
91 | 91 | path: elasticsearch-java |
92 | 92 |
|
93 | 93 | - 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." |
103 | 114 |
|
104 | 115 | - name: Creates new github release with version ${{ inputs.version }} |
105 | 116 | uses: softprops/action-gh-release@v2 |
|
0 commit comments