Skip to content

pypi

pypi #52

Workflow file for this run

name: pypi
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: config
run: |
RELEASE=${GITHUB_REF##*/}
sed -i -e "s/version=\".*\"/version=\"$RELEASE\"/" setup.py
echo $RELEASE
cat setup.py
- name: Install pip, setuptools, wheel, twine
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
# TODO COOKIETEMPLE: Configure your secrets to enable automatic deployment to PyPi on releases
# https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*