-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automate PyPI releases via GitHub Actions #132
Comments
@amureki suggestion name: Publish to PyPI
on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Build
run: |
pip install -U pip
pip install wheel
python setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }} |
@jairhenrique thanks, Jair! I was about to go with my "default" go-to solution via twine: I see you suggesting "pypa/gh-action-pypi-publish@release/v1" - that is something new to me and I am going check this out. Did you have a good experience with it on your projects? Is this better than good old twine? |
@amureki this is only an official pypa action to publish. I've never had any problems using it in my private projects, but classic twine works fine too. There's some opensource projects using it: |
@jairhenrique awesome, I'd be up for trying that. Would you be interested in preparing PR? I am happy to review and test it! |
On every new published GitHub release, we could trigger
python -m twine upload dist/*
The text was updated successfully, but these errors were encountered: