Skip to content

Commit 445cfc6

Browse files
committed
Tweak CI tag logging verbosity
1 parent a552ed4 commit 445cfc6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,19 @@ jobs:
104104
- name: Check the package version has corresponding Git tag
105105
id: tagged
106106
shell: bash
107-
run: git show-ref --tags --verify --quiet -- "refs/tags/${{ env.PROJECT_VERSION }}" && echo "tagExists=1" >> $GITHUB_OUTPUT || echo "tagExists=0" >> $GITHUB_OUTPUT
107+
run: |
108+
git show-ref --tags --verify --quiet -- "refs/tags/${{ env.PROJECT_VERSION }}" && echo "tagExists=1" >> $GITHUB_OUTPUT || echo "tagExists=0" >> $GITHUB_OUTPUT
109+
git show-ref --tags --verify --quiet -- "refs/tags/${{ env.PROJECT_VERSION }}" && echo "Tag for current version exists" || echo "Tag for current version does not exist"
108110
# If the tag could not be fetched, show a message and abort the job.
109-
- name: If tag version has a problem
111+
- name: Abort if tag exists, or existence check fails
110112
if: steps.tagged.outputs.tagExists
111113
run: |
112-
echo "The tag version has a problem."
114+
echo "Output of 'tagged' step: ${{ steps.tagged.outputs.tagExists }}"
115+
echo "Failed to check if tag exists."
113116
echo "PROJECT_VERSION: ${{ env.PROJECT_VERSION }}"
114117
echo "Tags $(git tag | wc -l):"
115118
git tag
119+
git show-ref --tags --verify -- "refs/tags/${{ env.PROJECT_VERSION }}"
116120
exit 1
117121
# Run build to generate the release artifacts.
118122
# Tag does not exist AND trigger was manual. Deploy release artifacts!

0 commit comments

Comments
 (0)