File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 7373
7474 ext=${{ matrix.extension }}
7575 file=$(ls postman*${ext})
76+ sha256sum "${file}"
7677 rm -v "${file}"
7778
7879 mv postman* Postman
@@ -117,7 +118,9 @@ jobs:
117118
118119 - name : " Create Postman archive"
119120 run : |
120- tar --xz -cf postman-${{ matrix.os_type }}-${{ env.VERSION }}.tar.xz ./Postman
121+ FILENAME=postman-${{ matrix.os_type }}-${{ env.VERSION }}.tar.xz
122+ echo "FILENAME=${FILENAME}" >> $GITHUB_ENV
123+ tar --xz -cf "$FILENAME" ./Postman
121124 ls -lh
122125
123126 - name : " Calculate Checksum"
@@ -128,7 +131,23 @@ jobs:
128131 echo -n "SHA256: " | tee -a checksum
129132 sha256sum postman*.tar.xz | tee -a checksum
130133
134+ - name : Check if we already released this version to skip Release File Step
135+ run : |
136+ url="https://github.com/${{ github.repository }}/releases/download/$VERSION/$FILENAME"
137+ echo "[DEBUG] URL = ${url}"
138+
139+ status_code=$(curl -sLo /dev/null -w "%{http_code}" "$url")
140+
141+ echo "[DEBUG] Status Code = ${status_code}"
142+
143+ if [[ "$status_code" == "404" ]]; then
144+ echo "RELEASE=true" >> $GITHUB_ENV
145+ else
146+ echo "[WARNING] ============================ SKIPPED CREATING RELEASE ============================"
147+ fi
148+
131149 - name : Release Files
150+ if : ${{ env.RELEASE }}
132151 uses : softprops/action-gh-release@master # use @master to be able to use append_body, use @v1 when it is released
133152 with :
134153 name : " Postman v${{ env.VERSION }}"
You can’t perform that action at this time.
0 commit comments