Skip to content

fix(build): use draft releases for VSIX upload#338

Merged
WilliamBerryiii merged 2 commits intomainfrom
fix/issue-335-draft-releases
Jan 28, 2026
Merged

fix(build): use draft releases for VSIX upload#338
WilliamBerryiii merged 2 commits intomainfrom
fix/issue-335-draft-releases

Conversation

@WilliamBerryiii
Copy link
Copy Markdown
Member

@WilliamBerryiii WilliamBerryiii commented Jan 28, 2026

Pull Request

Description

Fixes HTTP 422 error "Cannot upload assets to an immutable release" when uploading VSIX to GitHub releases. The repository has GitHub's immutable releases feature enabled, which prevents modifications to published releases.

This PR:

  • Configures release-please to create draft releases by adding "draft": true at the root level of release-please-config.json (applies globally to all packages)
  • Adds a publish step in the workflow that runs after VSIX upload using gh release edit --draft=false

Note: The "draft": true setting is placed at the root level rather than under packages["."] because release-please supports both locations, and root-level applies the setting globally. Since this repository has a single package, root-level placement is cleaner and functionally equivalent.

Related Issue(s)

Fixes #335

Type of Change

Select all that apply:

Code & Documentation:

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update

Infrastructure & Configuration:

  • GitHub Actions workflow
  • Linting configuration (markdown, PowerShell, etc.)
  • Security configuration
  • DevContainer configuration
  • Dependency update

AI Artifacts:

  • Reviewed contribution with prompt-builder agent and addressed all feedback
  • Copilot instructions (.github/instructions/*.instructions.md)
  • Copilot prompt (.github/prompts/*.prompt.md)
  • Copilot agent (.github/agents/*.agent.md)

Other:

  • Script/automation (.ps1, .sh, .py)
  • Other (please describe):

Testing

  • Validated workflow syntax with linting
  • Verified gh release edit --draft=false command syntax against GitHub CLI documentation
  • Reviewed release-please documentation confirming draft config option behavior at both root and package levels

Checklist

Required Checks

  • Documentation is updated (if applicable)
  • Files follow existing naming conventions
  • Changes are backwards compatible (if applicable)
  • Tests added for new functionality (if applicable)

Required Automated Checks

The following validation commands must pass before merging:

  • Markdown linting: npm run lint:md
  • Spell checking: npm run spell-check
  • Frontmatter validation: npm run lint:frontmatter
  • Link validation: npm run lint:md-links
  • PowerShell analysis: npm run lint:ps

Security Considerations

  • This PR does not contain any sensitive or NDA information
  • Any new dependencies have been reviewed for security issues
  • Security-related scripts follow the principle of least privilege

Additional Notes

The workflow uses the existing github.token which already has contents: write permission configured in the publish-extension job.

- add draft: true to release-please-config.json
- add publish step using gh release edit --draft=false

Fixes #335

📦 - Generated by Copilot
@WilliamBerryiii WilliamBerryiii requested a review from a team as a code owner January 28, 2026 17:48
Copilot AI review requested due to automatic review settings January 28, 2026 17:48
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 28, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the release workflow to avoid GitHub’s “immutable release” restriction by ensuring VSIX assets are uploaded while the GitHub Release is still a draft, then publishing it afterward.

Changes:

  • Configure release-please to create draft releases.
  • Publish the GitHub Release after VSIX upload via gh release edit --draft=false.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
release-please-config.json Enables draft releases to allow post-creation asset uploads.
.github/workflows/main.yml Adds a step to publish the release after uploading the VSIX asset.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 41.04%. Comparing base (ca988f2) to head (0977c8b).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #338      +/-   ##
==========================================
- Coverage   41.08%   41.04%   -0.04%     
==========================================
  Files          15       15              
  Lines        2870     2870              
==========================================
- Hits         1179     1178       -1     
- Misses       1691     1692       +1     
Flag Coverage Δ
pester 41.04% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@WilliamBerryiii WilliamBerryiii merged commit f1d3ac6 into main Jan 28, 2026
16 checks passed
@WilliamBerryiii WilliamBerryiii deleted the fix/issue-335-draft-releases branch January 28, 2026 20:54
WilliamBerryiii pushed a commit that referenced this pull request Jan 28, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.0.1](hve-core-v2.0.0...hve-core-v2.0.1)
(2026-01-28)


### 🐛 Bug Fixes

* **build:** use draft releases for VSIX upload
([#338](#338))
([f1d3ac6](f1d3ac6))
* **docs:** quote YAML frontmatter values in BRD template
([#339](#339))
([ca988f2](ca988f2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: hve-core-release-please[bot] <254602402+hve-core-release-please[bot]@users.noreply.github.com>
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.

fix(build): use draft releases to enable VSIX asset upload before publishing

4 participants