Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #266 +/- ##
=======================================
Coverage 48.11% 48.11%
=======================================
Files 57 57
Lines 5102 5102
=======================================
Hits 2455 2455
Misses 2647 2647 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Fixes issues introduced with Trusted Publishing rollout (#258) by separating Python build vs publish responsibilities and aligning React Native release workflow for OIDC/provenance-based publishing.
Changes:
- Split Python publishing so the reusable Python workflow can be called without publishing, and move PyPI publish into the main
release.yml. - Add a dedicated
release-python-publishjob to generate attestations and publish artifacts to PyPI from the main release workflow. - Update React Native release workflow to support Trusted Publishing better (Node upgrade, latest npm install, permissions tweak, remove unused setup-node options).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/release.yml |
Adds a new Python publish job in the main release pipeline (artifact download → attest → PyPI publish). |
.github/workflows/python-release.yml |
Renames release job to publish and skips publishing when invoked via workflow_call. |
.github/workflows/react-native-release.yml |
Updates Node/npm setup and permissions to better support npm provenance publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| permissions: | ||
| id-token: write | ||
| contents: write | ||
| attestations: write |
There was a problem hiding this comment.
release-python-publish sets job-level permissions but omits actions. When job-level permissions are present, missing scopes are reduced and this can prevent actions/download-artifact from reading artifacts. Add actions: read (or drop the job-level permissions override) so the publish job can reliably download artifacts.
| attestations: write | |
| attestations: write | |
| actions: read |
| # Use to sign the release artifacts | ||
| id-token: write | ||
| # Used to upload release artifacts | ||
| contents: write |
There was a problem hiding this comment.
This publish job grants contents: write, but the steps shown (download artifacts, generate attestations, publish to PyPI) don't appear to require write access to the repository contents. Reducing this to contents: read would follow least-privilege and lower the blast radius if the token is ever misused.
| contents: write | |
| contents: read |
| permissions: | ||
| # Use to sign the release artifacts | ||
| id-token: write | ||
| # Used to upload release artifacts | ||
| contents: write | ||
| # Used to generate artifact attestation | ||
| attestations: write | ||
| steps: |
There was a problem hiding this comment.
The publish job defines job-level permissions but omits actions. If these permissions override the workflow defaults, actions/download-artifact may not be able to read the uploaded wheel artifacts. Add actions: read to the job permissions (or remove the job-level override) to prevent publish failures.
| - name: Update npm to latest | ||
| if: steps.check_version.outputs.should_release == 'true' | ||
| run: npm install -g npm@latest |
There was a problem hiding this comment.
Installing npm@latest during a release workflow makes the publish environment non-reproducible and can introduce sudden breakages when npm releases a new major/minor. Consider pinning to a known-good minimum version that supports Trusted Publishing (e.g., a specific major) or documenting the required npm version so releases remain stable.
| - name: Update npm to latest | |
| if: steps.check_version.outputs.should_release == 'true' | |
| run: npm install -g npm@latest | |
| - name: Update npm to v10 | |
| if: steps.check_version.outputs.should_release == 'true' | |
| run: npm install -g npm@10 |
Summary
#258에서 적용한 Trusted Publishing 릴리즈 워크플로우의 문제점을 수정합니다.
Changes
Python 릴리즈 워크플로우 분리 (
python-release.yml,release.yml)python-release.yml의releasejob을publish로 rename하고,workflow_call로 호출된 경우 publish를 건너뛰도록if: github.event_name != 'workflow_call'조건 추가release.yml에 별도의release-python-publishjob 추가: 메인 릴리즈 워크플로우에서 직접 PyPI에 배포 (artifact attestation 생성 +pypa/gh-action-pypi-publish사용)React Native Trusted Publishing 지원 (
react-native-release.yml)contents: read권한 추가setup-node에서 불필요한scope옵션 제거npm install -g npm@latest스텝 추가하여 최신 npm의 Trusted Publishing(OIDC provenance) 지원 활용Changed Files
.github/workflows/python-release.ymlworkflow_call시 배포 스킵.github/workflows/react-native-release.yml.github/workflows/release.ymlrelease-python-publishjob 추가