Skip to content

Conversation

@sunt05
Copy link
Contributor

@sunt05 sunt05 commented Jul 3, 2025

Summary

  • Fixed the GitHub Actions publish workflow to correctly locate built distribution files
  • The workflow now correctly builds and publishes packages from the umep-reqs/ subdirectory

Problem

The publish workflow was failing with "No files found for package" because:

  1. The setup.py file is located in umep-reqs/ subdirectory
  2. Running python umep-reqs/setup.py sdist bdist_wheel creates dist files in umep-reqs/dist/
  3. But the publish action was looking for packages in the root dist/ directory

Solution

  • Changed the build step to cd umep-reqs && python setup.py sdist bdist_wheel
  • Updated both Test PyPI and PyPI publish steps to use packages_dir: umep-reqs/dist/

This ensures the workflow can find the built distribution files in the correct location.

Test plan

  • The workflow should now correctly build the package
  • The publish steps should find the distribution files in umep-reqs/dist/
  • The package should successfully publish to Test PyPI and PyPI (when tagged)

The build was failing because the workflow was looking for dist/ in the root directory, but the build command creates it in umep-reqs/dist/. This commit:

- Changes the build step to cd into umep-reqs directory before running setup.py
- Updates both Test PyPI and PyPI publish steps to use umep-reqs/dist/ as the packages directory
- Ensures the workflow can find the built distribution files in the correct location

This should resolve the "No files found for package" error seen in the CI runs.
sunt05 added 2 commits July 3, 2025 10:48
- Only publish to Test PyPI when pushing to main branch (not on PRs)
- Add verification step to check build artifacts are created correctly
- List contents of dist/ directory after build for debugging

This allows the workflow to run on PRs for testing the build process without attempting to publish (which would fail due to missing secrets).
- Adopt the new python -m build approach from main
- Keep the PR testing improvements (only publish on main push)
- Update paths to use root dist/ since pyproject.toml is now in root
- Add verification step to check build artifacts

The workflow now:
1. Uses modern Python build system with pyproject.toml
2. Only publishes to Test PyPI on main branch pushes
3. Runs build verification on all PRs without attempting to publish
@sunt05 sunt05 merged commit ab28aa5 into main Jul 3, 2025
1 check passed
@sunt05 sunt05 deleted the fix/publish-workflow-paths branch July 3, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants