[ACA-4649] correctly handle missing gha dry runs

This commit is contained in:
Denys Vuika 2023-03-07 11:32:36 +00:00
parent 53d21b82d3
commit f2e20c31fb
2 changed files with 5 additions and 6 deletions

View File

@ -23,9 +23,9 @@ runs:
run: | run: |
if [[ "${{ inputs.branch_name }}" == "master" ]]; then if [[ "${{ inputs.branch_name }}" == "master" ]]; then
VERSION=$(jq -cr '.version' < package.json) VERSION=$(jq -cr '.version' < package.json)
echo "git tag -a ${VERSION} -m ${VERSION}" echo "git tag -a ${VERSION} -m ${VERSION}"
if [[ "${{ inputs.dry-run }}" == "false" ]]; then
if [[ "${{ inputs.dry-run }}" != "true" ]]; then
git tag -a ${VERSION} -m "${VERSION} [ci skip] " git tag -a ${VERSION} -m "${VERSION} [ci skip] "
git remote rm origin git remote rm origin
GITHUB_REPO=https://${{ inputs.github_token }}:x-oauth-basic@github.com/Alfresco/alfresco-content-app.git GITHUB_REPO=https://${{ inputs.github_token }}:x-oauth-basic@github.com/Alfresco/alfresco-content-app.git
@ -34,4 +34,3 @@ runs:
fi; fi;
fi; fi;

View File

@ -59,7 +59,7 @@ runs:
for PROJECT in "${PROJECTS[@]}"; do for PROJECT in "${PROJECTS[@]}"; do
echo "Update ${PROJECT} version to ${NEW_LIBRARY_VERSION}" echo "Update ${PROJECT} version to ${NEW_LIBRARY_VERSION}"
if [[ "${{ inputs.dry-run }}" == "false" ]]; then if [[ "${{ inputs.dry-run }}" != "true" ]]; then
(cd cd $PROJECTS_DIR/${PROJECT} && npm version --allow-same-version --no-git-tag-version --force ${NEW_LIBRARY_VERSION}) (cd cd $PROJECTS_DIR/${PROJECT} && npm version --allow-same-version --no-git-tag-version --force ${NEW_LIBRARY_VERSION})
fi fi
done done
@ -79,7 +79,7 @@ runs:
do do
cd $DIST_DIR/${PROJECT} cd $DIST_DIR/${PROJECT}
if [[ "${{ inputs.dry-run }}" == "false" ]]; then if [[ "${{ inputs.dry-run }}" != "true" ]]; then
echo -e "Publish with dry mode for project to GH registry: $PROJECT\n" echo -e "Publish with dry mode for project to GH registry: $PROJECT\n"
echo -e "npm publish --dry-run --tag ${{ inputs.npm_tag }} \n" echo -e "npm publish --dry-run --tag ${{ inputs.npm_tag }} \n"
npm publish --dry-run --tag ${{ inputs.npm_tag }} npm publish --dry-run --tag ${{ inputs.npm_tag }}
@ -104,7 +104,7 @@ runs:
do do
cd $DIST_DIR/${PROJECT} cd $DIST_DIR/${PROJECT}
if [[ "${{ inputs.dry-run }}" == "false" ]]; then if [[ "${{ inputs.dry-run }}" != "true" ]]; then
echo -e "Publish with dry mode for project to NPM registry: $PROJECT\n" echo -e "Publish with dry mode for project to NPM registry: $PROJECT\n"
echo -e "npm publish --dry-run --tag ${{ inputs.npm_tag }} \n" echo -e "npm publish --dry-run --tag ${{ inputs.npm_tag }} \n"
npm publish --dry-run --tag ${{ inputs.npm_tag }} npm publish --dry-run --tag ${{ inputs.npm_tag }}