mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
## Summary Standardize the repo's Node contract on 24 while centralizing workflow resolution through `.nvmrc` so local setup, CI, and package metadata stay aligned from one version file. ## Changes - **What**: Add `package.json` `engines.node = 24.x`, switch every `actions/setup-node` workflow in the repo to `node-version-file: '.nvmrc'`, and update contributor and Playwright docs to point to `.nvmrc` as the Node source of truth. ## Review Focus The workflow behavior should be unchanged apart from sourcing the Node version from `.nvmrc` instead of repeating literals like `20`, `22`, `24.x`, or `lts/*`. GitHub's formatter also moved the new `engines` block to the package metadata section near the end of `package.json`. --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Alexander Brown <drjkl@comfy.org>
84 lines
2.3 KiB
YAML
84 lines
2.3 KiB
YAML
---
|
|
name: Publish Desktop UI on PR Merge
|
|
|
|
on:
|
|
pull_request:
|
|
types: ['closed']
|
|
branches: [main, core/*]
|
|
paths:
|
|
- 'apps/desktop-ui/package.json'
|
|
|
|
jobs:
|
|
resolve:
|
|
name: Resolve Version and Dist Tag
|
|
runs-on: ubuntu-latest
|
|
if: >
|
|
github.event.pull_request.merged == true &&
|
|
contains(github.event.pull_request.labels.*.name, 'Release')
|
|
outputs:
|
|
version: ${{ steps.get_version.outputs.version }}
|
|
dist_tag: ${{ steps.dist.outputs.dist_tag }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
ref: ${{ github.event.pull_request.merge_commit_sha }}
|
|
persist-credentials: false
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
|
|
- name: Read desktop-ui version
|
|
id: get_version
|
|
run: |
|
|
VERSION=$(node -p "require('./apps/desktop-ui/package.json').version")
|
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
|
|
- name: Determine dist-tag
|
|
id: dist
|
|
env:
|
|
VERSION: ${{ steps.get_version.outputs.version }}
|
|
run: |
|
|
if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+- ]]; then
|
|
echo "dist_tag=next" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "dist_tag=latest" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
publish:
|
|
name: Publish Desktop UI to npm
|
|
needs: resolve
|
|
uses: ./.github/workflows/publish-desktop-ui.yaml
|
|
with:
|
|
version: ${{ needs.resolve.outputs.version }}
|
|
dist_tag: ${{ needs.resolve.outputs.dist_tag }}
|
|
ref: ${{ github.event.pull_request.merge_commit_sha }}
|
|
secrets:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
comment_desktop_publish:
|
|
name: Comment Desktop Publish Summary
|
|
needs:
|
|
- resolve
|
|
- publish
|
|
if: success()
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
pull-requests: write
|
|
steps:
|
|
- name: Checkout merge commit
|
|
uses: actions/checkout@v6
|
|
with:
|
|
ref: ${{ github.event.pull_request.merge_commit_sha }}
|
|
fetch-depth: 2
|
|
|
|
- name: Post desktop release summary comment
|
|
uses: ./.github/actions/comment-release-links
|
|
with:
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
version_file: apps/desktop-ui/package.json
|