[build] Create config files from environment variables for publishing#16951
[build] Create config files from environment variables for publishing#16951titusfortner merged 3 commits intotrunkfrom
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
This PR fixes automated release process failures by creating configuration files from environment variables for publishing packages to npm, RubyGems, and PyPI. The change addresses environment variable issues that caused Ruby, Python, and JavaScript releases to fail on CI.
Changes:
- Hardcodes TWINE_USERNAME as
__token__for PyPI token authentication - Replaces static credential validation with dynamic setup functions that create config files from environment variables
- Removes TWINE_USERNAME from GitHub Actions workflow since it's now hardcoded
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Rakefile | Replaced credential validation entries with three new setup functions (setup_npm_auth, setup_gem_credentials, setup_pypirc) that dynamically create config files from environment variables. Updated release tasks to call setup functions instead of validation. |
| .github/workflows/bazel.yml | Removed TWINE_USERNAME environment variable since it's now hardcoded as token in the setup_pypirc function. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
User description
Ruby, Python & JS all failed automated release process yesterday on CI, but passed with same code when run locally.
I think it was probably environment variable related?
💥 What does this PR do?
🔧 Implementation Notes
Does not override existing credentials when found if you're running locally with your own
💡 Additional Considerations
We can't know if this will work until next release, unfortunately
🔄 Types of changes
PR Type
Bug fix, Enhancement
Description
Create config files from environment variables for publishing
Replace credential validation with dynamic setup functions
Set TWINE_USERNAME to token for PyPI authentication
Skip credential checks for nightly releases
Diagram Walkthrough
File Walkthrough
bazel.yml
Remove TWINE_USERNAME from workflow secrets.github/workflows/bazel.yml
setup
Rakefile
Replace credential validation with dynamic config file setupRakefile
RELEASE_CREDENTIALS
environment variable
GEM_HOST_API_KEY
from TWINE_PASSWORD
functions instead of credential validation