auto publish ✅ #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish PythFider | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
if: startsWith(github.event.head_commit.message, 'v') | |
runs-on: ubuntu-latest | |
environment: PythFinder | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: pip install setuptools wheel twine | |
- name: Build the package | |
run: python setup.py sdist bdist_wheel | |
- name: Publish to PyPI | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
echo "Token Length: ${#TWINE_PASSWORD}" | |
twine --version | |
twine upload --repository-url https://upload.pypi.org/legacy/ dist/* |