Skip to content

Commit 41e7243

Browse files
committed
Merge branch 'automatic-tagging'
2 parents 2b28907 + f8c3433 commit 41e7243

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

.github/workflows/release_central.yml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
env:
1919
BRANCH: ${{ inputs.branch }}
2020
VERSION: ${{ inputs.version }}
21+
PREV_VERSION: ${{ inputs.prev_version }}
2122
DRY_RUN: ${{ inputs.dry_run }}
2223

2324
jobs:
@@ -44,7 +45,8 @@ jobs:
4445
needs:
4546
- validate-version
4647
steps:
47-
- id: buildkite-run
48+
- name: Start buildkite run
49+
id: buildkite-run
4850
uses: elastic/oblt-actions/buildkite/run@v1
4951
with:
5052
pipeline: "elasticsearch-java-release"
@@ -54,3 +56,44 @@ jobs:
5456
env-vars: |
5557
DRY_RUN=${{ inputs.dry_run }}
5658
VERSION=${{ inputs.version }}
59+
60+
tag-bump-and-gh-release:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Fetch ephemeral GitHub token
64+
id: fetch-ephemeral-token
65+
uses: elastic/ci-gh-actions/[email protected]
66+
with:
67+
vault-instance: "ci-prod"
68+
69+
- name: Tag branch ${{ inputs.branch }} with release ${{ inputs.version }}, bump version with new release ${{ inputs.version }}
70+
uses: actions/checkout@v4
71+
with:
72+
repository: elastic/elasticsearch-java
73+
token: ${{ steps.fetch-ephemeral-token.outputs.token }}
74+
ref: ${{ inputs.branch }}
75+
path: elasticsearch-java
76+
# TODO git push after making sure the version bump works
77+
run: |
78+
git tag v${{ inputs.version }}
79+
git push origin v${{ inputs.version }}
80+
echo ${{ inputs.version }} > config/version.txt
81+
sed -i '/static final String VERSION/s/".*"/"${{ inputs.version }}"/' java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java
82+
83+
- name: Creates new github release with version ${{ inputs.version }}
84+
uses: softprops/action-gh-release@v2
85+
with:
86+
repository: elastic/elasticsearch-java
87+
token: ${{ steps.fetch-ephemeral-token.outputs.token }}
88+
ref: ${{ inputs.branch }}
89+
path: elasticsearch-java
90+
tag_name: v${{ inputs.version }}
91+
name: v${{ inputs.version }}
92+
draft: true
93+
prerelease: false
94+
body: |
95+
## What's Changed
96+
97+
**Full Changelog**: https://github.com/elastic/elasticsearch-java/compare/v{{inputs.prev_version}}...v{{ inputs.version }}
98+
99+

0 commit comments

Comments
 (0)