Add publish.yml release workflow - #91
Conversation
|
👋 Hello @glenn-jocher, thank you for submitting a
For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
The workflow is generally structured well for version detection, tagging, artifact building, and release attachments. The main issues are that the release pipeline is currently limited to a single GitHub actor, which can skip legitimate releases, and Slack can report success before the SBOM upload has completed.
💬 Posted 2 inline comments
b29e8df to
89211ec
Compare
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review 2
Made with ❤️ by Ultralytics Actions
No genuine blocking issues found. The new workflow is consistent with the intended template release flow: it gates on template.__version__, tags/releases only on increments or manual recovery, builds artifacts, leaves PyPI publishing intentionally disabled, generates an SBOM, and sends release notifications.
|
🚀 Merged — thank you @glenn-jocher for adding this complete release automation workflow! “Plans are nothing; planning is everything.” — Dwight D. Eisenhower This PR brings that spirit to the Ultralytics Python package template by turning release planning into a reliable, repeatable process: automated version detection, tagging, GitHub Releases, package builds, SBOM generation, Slack notifications, and safe PyPI publishing guidance. These improvements reduce manual maintenance, strengthen supply-chain transparency, and make the template more production-ready for future projects. Great work helping contributors ship faster, safer, and with more confidence 🙌 |
🛠️ Summary
Adds a
publish.ymlworkflow mirroring the release pipeline used in ultralytics/mkdocs and ultralytics/ultralytics, adapted for this template:__version__intemplate/__init__.pychanges in the pushed diff (comparesgithub.event.before→HEAD, falling back toHEAD~1). The sibling repos gate oncheck_pypi_version(), but thetemplatename on PyPI belongs to an unrelated package at 0.7.6, so that check would never fire here; the original step is left commented for forks to restore.v{version}, pushes the tag, and generates an AI release summary viaultralytics-actions-summarize-release.dist/artifact.id-tokenpermission, andpypa/gh-action-pypi-publishstep) with notes on enabling trusted publishing when forking this template into a real package.🧪 Testing
yaml.safe_load.check_versiongate logic dry-run locally under bash: no version change →increment=False, simulated bump →increment=True; bump-then-revert within one push correctly yields no release.🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Adds a complete GitHub Actions release workflow for the Ultralytics Python package template, enabling automated tagging, release creation, builds, SBOM generation, and optional PyPI publishing 🚀
📊 Key Changes
.github/workflows/publish.ymlworkflow for release automation 📦template/__init__.pyonmainand creates a matching Git tag and GitHub Release 🏷️python -m buildand uploads them as workflow artifacts 🛠️AGENTS.mdto document the new publishing workflow and its security assumptionsREADME.mdproject tree to includepublish.yml🎯 Purpose & Impact