Commit f1d3ac6
authored
fix(build): use draft releases for VSIX upload (#338)
# 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:**
- [x] 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:**
- [x] 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
- [x] Documentation is updated (if applicable)
- [x] Files follow existing naming conventions
- [x] Changes are backwards compatible (if applicable)
- [ ] Tests added for new functionality (if applicable)
### Required Automated Checks
The following validation commands must pass before merging:
- [x] Markdown linting: `npm run lint:md`
- [x] Spell checking: `npm run spell-check`
- [x] Frontmatter validation: `npm run lint:frontmatter`
- [x] Link validation: `npm run lint:md-links`
- [x] PowerShell analysis: `npm run lint:ps`
## Security Considerations
- [x] This PR does not contain any sensitive or NDA information
- [x] Any new dependencies have been reviewed for security issues
- [x] 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.1 parent ca988f2 commit f1d3ac6
2 files changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
0 commit comments