@@ -203,28 +203,16 @@ jobs:
203203 run : |
204204 git config --global user.name "${GIT_USERNAME:-github-actions[bot]}"
205205 git config --global user.email "${GIT_EMAIL:-github-actions[bot]@users.noreply.github.com}"
206- - name : " Create release tag"
207- run : |
208- mvn --batch-mode release:prepare \
209- -DscmCommentPrefix="[maven-release-plugin][skip ci] " \
210- -Dusername=$GIT_USERNAME \
211- -Dpassword=$GIT_PASSWORD \
212- -Psdk-release \
213- -DskipTests=true \
214- -Dgpg.passphrase=$GPG_SIGNING_PASSPHRASE \
215- -DautoVersionSubmodules=true \
216- -DtagNameFormat=@{project.version} \
217- -B
218-
219- - name : " Checkout release tag"
220- run : |
221- git fetch --tags
222- git checkout $(git describe --tags --abbrev=0)
223-
224206 - name : " Build & Publish"
207+ id : publish
225208 timeout-minutes : ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
226209 run : |
227- mvn --batch-mode clean verify gpg:sign central-publishing:publish \
228- -P sdk-release \
229- -DskipTests=true \
230- -Dgpg.passphrase=$GPG_SIGNING_PASSPHRASE
210+ mvn --batch-mode clean package gpg:sign central-publishing:publish -P sdk-release -DskipTests=true -Dgpg.passphrase=$GPG_SIGNING_PASSPHRASE
211+ - name : " Create release tag"
212+ if : success() && steps.publish.outcome == 'success'
213+ run : |
214+ VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
215+ git config --global user.name "${GIT_USERNAME:-github-actions[bot]}"
216+ git config --global user.email "${GIT_EMAIL:-github-actions[bot]@users.noreply.github.com}"
217+ git tag "$VERSION"
218+ git push origin "$VERSION"
0 commit comments