|
18 | 18 | env: |
19 | 19 | BRANCH: ${{ inputs.branch }} |
20 | 20 | VERSION: ${{ inputs.version }} |
| 21 | + PREV_VERSION: ${{ inputs.prev_version }} |
21 | 22 | DRY_RUN: ${{ inputs.dry_run }} |
22 | 23 |
|
23 | 24 | jobs: |
|
44 | 45 | needs: |
45 | 46 | - validate-version |
46 | 47 | steps: |
47 | | - - id: buildkite-run |
| 48 | + - name: Start buildkite run |
| 49 | + id: buildkite-run |
48 | 50 | uses: elastic/oblt-actions/buildkite/run@v1 |
49 | 51 | with: |
50 | 52 | pipeline: "elasticsearch-java-release" |
|
54 | 56 | env-vars: | |
55 | 57 | DRY_RUN=${{ inputs.dry_run }} |
56 | 58 | 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