File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -423,10 +423,15 @@ jobs:
423423 VSX_TAG="b2c-vs-extension@${{ steps.packages.outputs.version_vsx }}"
424424
425425 # Create a dedicated release for the extension (not latest — main releases own that)
426- gh release create "$VSX_TAG" \
427- --title "VS Code Extension ${{ steps.packages.outputs.version_vsx }}" \
428- --latest=false \
429- --notes "$(cat <<'NOTES'
426+ # Use --clobber on upload in case a previous run partially completed
427+ if gh release view "$VSX_TAG" >/dev/null 2>&1; then
428+ echo "Release $VSX_TAG already exists, uploading VSIX to it"
429+ gh release upload "$VSX_TAG" packages/b2c-vs-extension/*.vsix --clobber
430+ else
431+ gh release create "$VSX_TAG" \
432+ --title "VS Code Extension ${{ steps.packages.outputs.version_vsx }}" \
433+ --latest=false \
434+ --notes "$(cat <<'NOTES'
430435 ## B2C DX VS Code Extension v${{ steps.packages.outputs.version_vsx }}
431436
432437 Download the \`.vsix\` file below and install via:
@@ -438,8 +443,9 @@ jobs:
438443 NOTES
439444 )"
440445
441- # Upload the VSIX to the dedicated release
442- gh release upload "$VSX_TAG" packages/b2c-vs-extension/*.vsix
446+ # Upload the VSIX to the dedicated release
447+ gh release upload "$VSX_TAG" packages/b2c-vs-extension/*.vsix
448+ fi
443449 env :
444450 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
445451
You can’t perform that action at this time.
0 commit comments