File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8484 tag="${{ steps.bump.outputs.tag }}"
8585
8686 if [ ! -f CHANGELOG.md ]; then
87- cat > CHANGELOG.md <<'EOC'
88- # Changelog
89-
90- All notable changes to this project will be documented in this file.
91- EOC
87+ printf '# Changelog\n\nAll notable changes to this project will be documented in this file.\n' > CHANGELOG.md
9288 fi
9389
9490 tmpfile="$(mktemp)"
137133 git push origin "$tag"
138134
139135 - name : Publish GitHub release
140- uses : softprops/action-gh-release@v2
141- with :
142- tag_name : ${{ steps.bump.outputs.tag }}
143- generate_release_notes : true
136+ shell : bash
137+ env :
138+ GH_TOKEN : ${{ github.token }}
139+ run : |
140+ set -euo pipefail
141+
142+ tag="${{ steps.bump.outputs.tag }}"
143+
144+ if gh release view "$tag" >/dev/null 2>&1; then
145+ echo "Release $tag already exists"
146+ exit 0
147+ fi
148+
149+ gh release create "$tag" \
150+ --title "Release $tag" \
151+ --generate-notes
You can’t perform that action at this time.
0 commit comments