Merge pull request #976 from ToFuProject/devel #10
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 pip sdist to PyPI | |
on: | |
release: | |
types: | |
[created] | |
push: | |
branches: | |
- master | |
- deploy-test | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Display python version | |
run: | | |
python -c "import sys; print(sys.version)" | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install setuptools wheel twine | |
pip install -r requirements.txt | |
- name: check ref and event | |
run: | | |
echo ${{github.ref}} | |
- name: Build sdist | |
run: | | |
python setup.py sdist | |
- name: Publish source to PyPI | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
twine upload dist/*.tar.gz |