[ACA-4649] fix lib publishing (#3042)

* [ACA-4649] fix lib publishing

* fix cd typo

* add safety check for existing tag
This commit is contained in:
Denys Vuika
2023-03-07 07:30:05 -05:00
committed by GitHub
parent f2e20c31fb
commit 2ed5373798
2 changed files with 16 additions and 13 deletions
+12 -9
View File
@@ -25,12 +25,15 @@ runs:
VERSION=$(jq -cr '.version' < package.json)
echo "git tag -a ${VERSION} -m ${VERSION}"
if [[ "${{ inputs.dry-run }}" != "true" ]]; then
git tag -a ${VERSION} -m "${VERSION} [ci skip] "
git remote rm origin
GITHUB_REPO=https://${{ inputs.github_token }}:x-oauth-basic@github.com/Alfresco/alfresco-content-app.git
git remote add origin $GITHUB_REPO
git push origin --tags
fi;
fi;
if [ $(git tag -l "$VERSION") ]; then
echo "Tag \"$VERSION\" already exists. Skipping."
else
if [[ "${{ inputs.dry-run }}" != "true" ]]; then
git tag -a ${VERSION} -m "${VERSION} [ci skip] "
git remote rm origin
GITHUB_REPO=https://${{ inputs.github_token }}:x-oauth-basic@github.com/Alfresco/alfresco-content-app.git
git remote add origin $GITHUB_REPO
git push origin --tags
fi
fi
fi