Skip to content

Commit 4dcf7ec

Browse files
committed
automatic bump and release
1 parent 300d591 commit 4dcf7ec

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/release_central.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,16 @@ jobs:
5656
DRY_RUN=${{ inputs.dry_run }}
5757
VERSION=${{ inputs.version }}
5858
59+
tag-bump-and-gh-release:
60+
runs-on: ubuntu-latest
61+
steps:
5962
- name: Fetch ephemeral GitHub token
6063
id: fetch-ephemeral-token
6164
uses: elastic/ci-gh-actions/[email protected]
6265
with:
6366
vault-instance: "ci-prod"
6467

65-
- name: Tag branch ${{ inputs.branch }} with release ${{ inputs.version }}
68+
- name: Tag branch ${{ inputs.branch }} with release ${{ inputs.version }}, bump version with new release ${{ inputs.version }}
6669
uses: actions/checkout@v4
6770
with:
6871
repository: elastic/elasticsearch-java
@@ -72,3 +75,24 @@ jobs:
7275
run: |
7376
git tag v${{ inputs.version }}
7477
git push origin v${{ inputs.version }}
78+
echo ${{ inputs.version }} > config/version.txt
79+
sed -i '/static final String VERSION/s/".*"/"${{ inputs.version }}"/' java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java
80+
81+
# TODO get {old-tag}
82+
- name: Creates new github release with version ${{ inputs.version }}
83+
uses: softprops/action-gh-release@v2
84+
with:
85+
repository: elastic/elasticsearch-java
86+
token: ${{ steps.fetch-ephemeral-token.outputs.token }}
87+
ref: ${{ inputs.branch }}
88+
path: elasticsearch-java
89+
tag_name: v${{ inputs.version }}
90+
name: v${{ inputs.version }}
91+
draft: true
92+
prerelease: false
93+
body: |
94+
## What's Changed
95+
96+
**Full Changelog**: https://github.com/elastic/elasticsearch-java/compare/v{old-tag}...v{{ inputs.version }}
97+
98+

0 commit comments

Comments
 (0)