-
Notifications
You must be signed in to change notification settings - Fork 130
Fix release workflow draft handling and npm OIDC authentication #274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Split release creation into two steps to avoid immutable release error - Step 1: Upload assets to draft release (draft: true) - Step 2: Publish release without touching assets (draft: false) - Resolves softprops/action-gh-release#653 issue with immutable releases This ensures: 1. tagpr creates draft release correctly 2. Assets are uploaded to mutable draft release 3. Release is published only after assets are uploaded 4. No "Cannot upload assets to immutable release" errors 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add npm update step to npm-publish job before dependencies installation - Node.js 22 ships with npm 10.9.3, but OIDC Trusted Publishers requires npm 11.5.1+ - This ensures npm CLI can detect and use OIDC authentication properly - Enables automatic provenance attestations for enhanced supply chain security Combined with previous draft release workflow fix, this should resolve: 1. "Cannot upload assets to immutable release" error (draft handling) 2. npm publish authentication failures (npm version requirement) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes critical issues in the release workflow that were preventing successful releases, specifically addressing draft release handling and npm OIDC authentication requirements.
- Split release process into two steps to prevent "immutable release" errors when uploading assets
- Updated npm to latest version to support OIDC Trusted Publishers authentication
- Maintained existing release functionality while fixing the upload failure points
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
with: | ||
files: | | ||
artifacts/*/* | ||
frontend/demo-recordings/*.webm | ||
draft: true | ||
prerelease: false | ||
|
||
- name: Publish release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
generate_release_notes: true | ||
draft: false | ||
prerelease: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two-step release process duplicates the action usage. Consider extracting common parameters to environment variables or using YAML anchors to reduce duplication and ensure consistency between the steps.
with: | |
files: | | |
artifacts/*/* | |
frontend/demo-recordings/*.webm | |
draft: true | |
prerelease: false | |
- name: Publish release | |
uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: true | |
draft: false | |
prerelease: false | |
with: &gh_release_common | |
files: | | |
artifacts/*/* | |
frontend/demo-recordings/*.webm | |
prerelease: false | |
draft: true | |
- name: Publish release | |
uses: softprops/action-gh-release@v2 | |
with: | |
<<: *gh_release_common | |
generate_release_notes: true | |
draft: false |
Copilot uses AI. Check for mistakes.
Summary
This PR fixes two critical issues in the release workflow that were causing failures in v0.1.52:
Type of Change
Root Cause Analysis
Issue 1: Immutable Release Error
Problem: tagpr correctly created draft releases, but
softprops/action-gh-release
withdraft: false
immediately published the release, then failed when trying to upload assets to the now-immutable published release.Timeline:
Issue 2: npm Authentication Failure
Problem: Node.js 22 ships with npm 10.9.3, but npm Trusted Publishers requires npm 11.5.1+. The workflow attempted OIDC authentication with insufficient npm version.
Changes Made
1. Two-Step Release Process (.github/workflows/release.yml)
2. npm Version Update for OIDC Support
Benefits
Manual Configuration Still Required
After merging, configure npm Trusted Publisher on npmjs.com:
sugyan
claude-code-webui
release.yml
Testing
This should resolve both the release asset upload failures and npm publishing authentication issues.
🤖 Generated with Claude Code