Skip to content

Commit 3f09712

Browse files
committed
[ACS-9977]: [publish] automatic tag creation work, adding git command
1 parent db0a9f4 commit 3f09712

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,16 @@ jobs:
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}"
206206
- name: "Publish"
207+
id: publish
207208
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
208209
run: |
209-
mvn --batch-mode clean package gpg:sign central-publishing:publish release:prepare release:perform \
210-
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \
211-
-Dusername=$GIT_USERNAME \
212-
-Dpassword=$GIT_PASSWORD \
213-
-Psdk-release \
214-
-DskipTests=true \
215-
-Dgpg.passphrase=$GPG_SIGNING_PASSPHRASE \
216-
-DautoVersionSubmodules=true \
217-
-DtagNameFormat=@{project.version} \
218-
-B
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 | sed 's/-SNAPSHOT//')
215+
ARTIFACT_ID=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)
216+
git config --global user.name "${GIT_USERNAME:-github-actions[bot]}"
217+
git config --global user.email "${GIT_EMAIL:-github-actions[bot]@users.noreply.github.com}"
218+
git tag "$ARTIFACT_ID"-"$VERSION"
219+
git push origin "$ARTIFACT_ID"-"$VERSION"

0 commit comments

Comments
 (0)