Formats.json tuning #53
Workflow file for this run
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: 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/* |