File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 pull-requests : read
1414 steps :
1515 - name : Clone repository
16- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 .0.2
16+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 .0.1
1717 with :
1818 persist-credentials : false
1919 fetch-depth : 0
@@ -40,22 +40,25 @@ jobs:
4040 exit 1
4141 fi
4242
43- COMMIT_EXISTS =$(git tag --points-at "$SHA" | grep '^v202' || true)
43+ TAG_EXISTS =$(git tag --points-at "$SHA" | grep '^v202' || true)
4444
45- if [ -n "$COMMIT_EXISTS" ]; then
46- echo "Already released as ${COMMIT_EXISTS}."
47- exit 1
45+ if [ -n "$TAG_EXISTS" ]; then
46+ echo "Already released as ${TAG_EXISTS}."
47+ echo "release=false" >> "$GITHUB_OUTPUT"
48+ exit 0
4849 fi
4950
5051 VERSION="v$(date -u +%Y.%m.%d)"
5152
5253 if [ -n "$(git tag -l "$VERSION")" ]; then
53- echo "::error::Tag $VERSION already exists. Delete it or this deploy must wait for tomorrow's date. "
54+ echo "::error::Tag $VERSION already exists."
5455 exit 1
5556 fi
5657
5758 echo "version=$VERSION" >> "$GITHUB_OUTPUT"
59+ echo "release=true" >> "$GITHUB_OUTPUT"
5860 - name : Create GitHub Release
61+ if : steps.check.outputs.release == 'true'
5962 uses : softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
6063 with :
6164 tag_name : " ${{ steps.check.outputs.version }}"
You can’t perform that action at this time.
0 commit comments