Upload Python Package #33
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
# https://www.caktusgroup.com/blog/2021/02/11/automating-pypi-releases/ | |
name: Upload Python Package | |
on: | |
release: | |
types: [ created ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python3-mpi4py python3-numpy python3-distutils | |
sudo apt-get install -y libhdf5-openmpi-dev libfftw3-3 libfftw3-dev | |
- name: Install python dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install --upgrade wheel numpy mpi4py cython twine setuptools | |
python3 -m pip install -r requirements.txt | |
- name: Build and publish | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
pip3 list | |
python3 setup.py sdist | |
python3 -m twine upload dist/* |