File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 44
44
echo "changed=false" >> $GITHUB_OUTPUT
45
45
fi
46
46
47
+ - name : Check if release already exists
48
+ id : release_exists
49
+ run : |
50
+ TAG="v${{ steps.versions.outputs.current }}"
51
+ STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
52
+ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
53
+ https://api.github.com/repos/${{ github.repository }}/releases/tags/$TAG)
54
+
55
+ if [ "$STATUS" -eq 200 ]; then
56
+ echo "exists=true" >> $GITHUB_OUTPUT
57
+ else
58
+ echo "exists=false" >> $GITHUB_OUTPUT
59
+ fi
60
+
47
61
- name : Zip Extension Files
48
62
run : |
49
63
rm -f keepcode.zip
57
71
-x "keepcode.zip"
58
72
59
73
- name : Create Release
60
- if : steps.check_version.outputs.changed == 'true'
74
+ if : steps.check_version.outputs.changed == 'true' && steps.release_exists.outputs.exists == 'false'
61
75
uses : softprops/action-gh-release@v2
62
76
with :
63
77
tag_name : v${{ steps.versions.outputs.current }}
You can’t perform that action at this time.
0 commit comments