To enable automatic publishing to PyPI, you need to configure trusted publishing on PyPI:
- Go to https://pypi.org/manage/project/pytest-language-server/settings/publishing/
- Click "Add a new publisher"
- Configure the following:
- PyPI Project Name:
pytest-language-server - Owner:
bellini666 - Repository name:
pytest-language-server - Workflow name:
release.yml - Environment name: (leave empty)
- PyPI Project Name:
This allows the GitHub Actions workflow to publish to PyPI without requiring an API token.
- Ensure all changes are committed and pushed to
master - Run tests locally:
cargo test - Create and push a version tag:
git tag v0.X.Y git push origin v0.X.Y
- The GitHub Actions workflow will automatically:
- Build wheels for all platforms (Linux, macOS, Windows)
- Build for multiple Python versions (3.10-3.14, 3.14t, PyPy)
- Generate artifact attestations for supply chain security
- Create a GitHub release with all wheels
- Publish to PyPI
- Publish to crates.io (requires
CARGO_REGISTRY_TOKENsecret)
The workflow also publishes to crates.io. Ensure the CARGO_REGISTRY_TOKEN secret is set:
- Generate a token at https://crates.io/me/tokens
- Add it to GitHub repository secrets as
CARGO_REGISTRY_TOKEN
After a release, update the Homebrew formula SHA256 hashes:
- Download the wheels from the GitHub release
- Calculate SHA256 for each platform:
shasum -a 256 pytest_language_server-X.Y.Z-*.whl - Update
Formula/pytest-language-server.rbwith the actual hashes - Commit and push the updated formula
- Verify trusted publishing is configured correctly on PyPI
- Check that the workflow has
id-token: writepermission - Ensure package version doesn't already exist on PyPI
- The workflow uses
softprops/action-gh-releasewhich may show "Not Found" errors when trying to delete non-existent assets - These errors are usually harmless if the upload succeeds afterward
- The workflow now flattens the directory structure to avoid glob pattern issues
- Check that all build jobs completed successfully
- Verify artifact upload/download worked correctly
- Look for build errors in the CI logs for specific platforms