Skip to content

Latest commit

 

History

History
140 lines (93 loc) · 2.41 KB

File metadata and controls

140 lines (93 loc) · 2.41 KB

Publishing moneyflow to PyPI

Prerequisites

  1. PyPI Account: Create accounts on PyPI and TestPyPI
  2. API Tokens: Generate API tokens for both (Account Settings → API tokens)
  3. Configure credentials:
cat > ~/.pypirc << 'EOF'
[distutils]
index-servers =
    pypi
    testpypi

[pypi]
username = __token__
password = pypi-YOUR_PYPI_TOKEN_HERE

[testpypi]
repository = https://test.pypi.org/legacy/
username = __token__
password = pypi-YOUR_TESTPYPI_TOKEN_HERE
EOF

chmod 600 ~/.pypirc

Publishing Workflow

Use the automated scripts in scripts/ directory:

1. Bump Version

./scripts/bump-version.sh 0.2.0

This updates pyproject.toml, commits, and creates a git tag.

2. Test Build Locally

./scripts/test-build.sh

Builds and tests the package with uvx before uploading.

3. Publish to TestPyPI

./scripts/publish-testpypi.sh

Runs tests, builds, and uploads to TestPyPI.

4. Test from TestPyPI

uvx --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ moneyflow --demo

5. Publish to PyPI

./scripts/publish-pypi.sh

Publishes to production PyPI (with confirmation prompts).

6. Push to GitHub

git push && git push --tags

7. Post-Publish Automation

./scripts/post-publish.sh v0.2.0

This automates:

  • Updating stable branch to release tag
  • Pushing to GitHub (triggers docs deployment with screenshot generation)

Quick Reference

# Full release workflow
./scripts/bump-version.sh 0.2.0
./scripts/test-build.sh
./scripts/publish-testpypi.sh
# Test from TestPyPI...
./scripts/publish-pypi.sh
git push && git push --tags
./scripts/post-publish.sh v0.2.0

See scripts/README.md for detailed script documentation.


Troubleshooting

Script permission denied

chmod +x scripts/*.sh

"Filename already used" on PyPI

You can't re-upload the same version. Bump version and try again.

TestPyPI allows re-uploads for testing.

uvx can't find command after install

Check entry point in pyproject.toml:

[project.scripts]
moneyflow = "moneyflow.app:main"

After Publishing

Your package will be available at: