Conversation
|
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Adds a manually-triggered GitHub Actions workflow to publish “misc” npm packages from this repo (currently @swc/types and @swc/helpers) with a selectable dist-tag.
Changes:
- Introduces
.github/workflows/publish-misc-packages.ymlworkflow triggered viaworkflow_dispatch. - Publishes
@swc/typesand@swc/helpersvia a matrix job withnpmTaginput (latest/nightly). - Uses the existing Node setup composite action and trusted-publish permissions (
id-token: write) plus an npm update step.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Ensure workflow runs from main | ||
| shell: bash | ||
| run: | | ||
| if [[ "${GITHUB_REF}" != "refs/heads/main" ]]; then | ||
| echo "This workflow can only run from refs/heads/main. Current ref: ${GITHUB_REF}" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
The main-branch guard is implemented as a runtime step, which still triggers the environment: publish protection flow and starts runners before failing. Other publish workflows in this repo use a job-level branch guard (e.g. .github/workflows/publish-npm-package.yml:55-56 uses if: github.ref == 'refs/heads/main') to prevent the job from starting at all. Consider moving this check to jobs.publish.if: github.ref == 'refs/heads/main' (and removing the step) so non-main dispatches are rejected earlier and don’t require environment approval.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94c8e84d11
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
PR Review: ci: add misc npm publish workflowOverall this is a clean, well-structured workflow. A few observations: Looks Good
Suggestions / Questions
Security
Test Coverage
LGTM — the workflow is simple, follows existing patterns, and has appropriate safeguards. The suggestions above are minor improvements, not blockers. |
Binary Sizes
Commit: a428993 |
Summary
Publish misc packages.@swc/typesand@swc/helpersviaworkflow_dispatch.main.Details
npmTaginput withlatestandnightlyoptions.id-token: write,environment: publish, and an npm upgrade step.yarn npm publish --access public --tag ... --tolerate-republish.