[ACS-9977]: [publish] automatic tag creation work, adding git command

This commit is contained in:
vivekkr0311
2025-08-08 12:55:06 +05:30
parent db0a9f4bb1
commit 3f0971259d

View File

@@ -204,15 +204,16 @@ jobs:
git config --global user.name "${GIT_USERNAME:-github-actions[bot]}"
git config --global user.email "${GIT_EMAIL:-github-actions[bot]@users.noreply.github.com}"
- name: "Publish"
id: publish
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
mvn --batch-mode clean package gpg:sign central-publishing:publish release:prepare release:perform \
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \
-Dusername=$GIT_USERNAME \
-Dpassword=$GIT_PASSWORD \
-Psdk-release \
-DskipTests=true \
-Dgpg.passphrase=$GPG_SIGNING_PASSPHRASE \
-DautoVersionSubmodules=true \
-DtagNameFormat=@{project.version} \
-B
mvn --batch-mode clean package gpg:sign central-publishing:publish -P sdk-release -DskipTests=true -Dgpg.passphrase=$GPG_SIGNING_PASSPHRASE
- name: "Create release tag"
if: success() && steps.publish.outcome == 'success'
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | sed 's/-SNAPSHOT//')
ARTIFACT_ID=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)
git config --global user.name "${GIT_USERNAME:-github-actions[bot]}"
git config --global user.email "${GIT_EMAIL:-github-actions[bot]@users.noreply.github.com}"
git tag "$ARTIFACT_ID"-"$VERSION"
git push origin "$ARTIFACT_ID"-"$VERSION"