Commit Graph
4 Commits
Author SHA1 Message Date
Reithan 07f5ea0dbe Add version increment check to publish workflow (#33)
## Summary
- Add version increment check before publishing to Comfy registry
- Compare current version in pyproject.toml against HEAD~1
- Skip publishing successfully if version is unchanged (prevents
unnecessary publish attempts)
- Fail workflow if version is downgraded (prevents registry conflicts)
- Use Python with semantic versioning for robust comparison (handles
0.7.10 > 0.7.9 correctly)

## Changes
- Modified `.github/workflows/publish.yml`:
  - Added `fetch-depth: 2` to checkout step to access HEAD~1
  - Added new version check step with Python script
  - Made publish step conditional on version increment

## Test Plan
- [x] All pre-commit hooks pass
- [x] All tests pass
- [ ] Test unchanged version: Modify pyproject.toml metadata (not
version), workflow should skip publish
- [ ] Test version increment: Bump version, workflow should publish
- [ ] Test version downgrade: Downgrade version, workflow should fail
- [ ] Test invalid version: Malformed version, workflow should fail

The workflow can be tested using manual `workflow_dispatch` trigger
after merge.
2026-05-15 18:05:58 -07:00
Reithan cd1f2e76f4 Fix Node.js 20 deprecation warnings in GitHub Actions
- Update actions/checkout from @v4 to @v5 for Node.js 24 support
- Update Comfy-Org/publish-node-action from @v1 to @main per official docs
- Add FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable
2026-05-15 14:17:02 -07:00
Reithan 4930d862d5 Update publish.yml 2025-07-21 03:50:11 -07:00
99824b2ee5 Add Github Action for Publishing to Comfy Registry (#6)
This PR adds a Github Action (publish-node-action) that will publish an
updated version of your custom node to the
[registry](https://registry.comfy.org/) whenever the `pyproject.toml`
file changes. The pyproject.toml defines the custom node version you
want to publish (added in another PR). Make sure you update the version
number in `pyproject.toml` when you make a change that should be
published to everyone!

Action Required:

- [ ] Make sure the trigger branch (`master` or `main`) in
`publish.yaml` matches the branch you want to use as the publishing
branch. It will only trigger when the pyproject.toml gets updated on
that branch.
- [ ] Create an api key on the Registry for publishing from Github.
[Instructions](https://docs.comfy.org/registry/publishing#create-an-api-key-for-publishing).
- [ ] Add it to your Github Repository Secrets as
`REGISTRY_ACCESS_TOKEN`.

Please message me on Discord at robinken or join our
[server](https://discord.com/invite/comfyorg) server if you have any
questions!

---------

Co-authored-by: snomiao <snomiao+comfy-pr@gmail.com>
Co-authored-by: Reithan <bo122081@hotmail.com>
2025-07-21 01:50:39 -07:00