We'll use GitHub's Trusted Publishing (OpenID Connect) to publish to PyPI. This is more secure than using API tokens.
-
Go to https://pypi.org/ and log in
-
Go to your account settings
-
Navigate to "Publishing" section
-
Click "Add a new pending publisher"
-
Fill in the details:
- PyPI Project Name:
feelpp-aptly-publisher - Owner:
feelpp - Repository name:
apt - Workflow name:
publish.yml - Environment name:
pypi(optional but recommended)
- PyPI Project Name:
-
Click "Add"
- Go to https://github.com/feelpp/apt/settings/environments
- Click "New environment"
- Name it
pypi - Add protection rules:
- ✅ Required reviewers (optional)
- ✅ Wait timer (optional)
- ✅ Deployment branches: Only default branch
- Click "Configure environment"
# Make sure all changes are committed
cd /nvme0/prudhomm/Devel/feelpp.quickfix/apt
git add .
git commit -m "feat: ready for v1.0.0 release"
git push origin main
# Create and push tag
git tag -a v1.0.0 -m "Release v1.0.0 - Initial release"
git push origin v1.0.0- Go to https://github.com/feelpp/apt/releases/new
- Choose tag:
v1.0.0 - Release title:
v1.0.0 - Initial Release - Description:
# feelpp-aptly-publisher v1.0.0
First stable release of the Feel++ Aptly Publisher!
## 🚀 Features
- Publish Debian packages to APT repositories via GitHub Pages
- Support for multiple channels (stable, testing, pr)
- GPG signing support
- Zero external Python dependencies
- Comprehensive test suite
- Full CI/CD integration
## 📦 Installation
```bash
pip install feelpp-aptly-publisherfeelpp-apt-publish \
--component myproject \
--channel stable \
--distro noble \
--debs ./packages/- Python 3.8-3.12 compatible
- 10/10 tests passing
- Black, Flake8, Mypy verified
- Built with uv
Full Changelog: https://github.com/feelpp/apt/commits/v1.0.0
5. Click "Publish release"
### 5. Watch the Action
1. Go to https://github.com/feelpp/apt/actions
2. Watch the "Publish to PyPI" workflow run
3. It should:
- Build the package
- Validate with twine
- Publish to PyPI using trusted publishing
- Complete successfully ✅
## Alternative: Manual Trigger
If you want to test with Test PyPI first:
1. Go to https://github.com/feelpp/apt/actions/workflows/publish.yml
2. Click "Run workflow"
3. Select branch: `main`
4. Repository: `testpypi`
5. Click "Run workflow"
This will publish to Test PyPI where you can test installation:
```bash
pip install --index-url https://test.pypi.org/simple/ feelpp-aptly-publisher
Once published, verify:
# Search on PyPI
pip search feelpp-aptly-publisher
# Install
pip install feelpp-aptly-publisher
# Test
feelpp-apt-publish --version
feelpp-apt-publish --help- Make sure workflow file is named exactly
publish.yml - Check it's in
.github/workflows/
- Complete Step 1 above on PyPI.org
- Wait a few minutes for propagation
- Make sure the workflow has
id-token: writepermission - Check our
.github/workflows/publish.ymlhas this
- The name might be taken
- Choose alternative name or contact current owner
After successful publication:
- Package appears on PyPI: https://pypi.org/project/feelpp-aptly-publisher/
- Anyone can install:
pip install feelpp-aptly-publisher - Update MMG and other projects to use it
- Monitor downloads: Check PyPI stats
For subsequent releases:
- Update version in
pyproject.tomlandsrc/feelpp_aptly_publisher/__init__.py - Commit changes
- Create new tag:
git tag v1.1.0 - Push:
git push origin v1.1.0 - Create GitHub release
- CI publishes automatically
No manual PyPI steps needed after initial setup! 🎉