Skip to content

Fix build-and-release: replace softprops/action-gh-release with gh CLI upload - #1

Draft
ClaneSharke with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-build-and-release-job
Draft

Fix build-and-release: replace softprops/action-gh-release with gh CLI upload#1
ClaneSharke with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-build-and-release-job

Conversation

Copilot AI commented Aug 1, 2026

Copy link
Copy Markdown

softprops/action-gh-release@v2 fails with 404 Not Found on update-a-release-asset when a release for the tag already exists with a VSIX asset attached — the PATCH endpoint only updates asset metadata, not binary content, so overwriting via that path is broken.

Changes

  • release.yml: Replace the softprops/action-gh-release@v2 upload step with gh release upload --clobber, which correctly handles both the "no release yet" and "release + asset already exist" cases
- name: Upload VSIX to release
  shell: pwsh
  run: |
    $tag  = "${{ steps.tag.outputs.tag }}"
    $vsix = "src/SsmsSqlFormatter/bin/Release/SsmsSqlFormatter.vsix"
    gh release view $tag 2>$null
    if ($LASTEXITCODE -ne 0) {
      gh release create $tag --title $tag --notes ""
    }
    gh release upload $tag $vsix --clobber
  env:
    GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

--clobber deletes the stale asset and re-uploads rather than attempting a metadata-only PATCH, bypassing the broken code path entirely.

Copilot AI changed the title [WIP] Fix failing GitHub Actions job build-and-release Fix build-and-release: replace softprops/action-gh-release with gh CLI upload Aug 1, 2026
Copilot AI requested a review from ClaneSharke August 1, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants