-
Notifications
You must be signed in to change notification settings - Fork 7
33 lines (29 loc) · 955 Bytes
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# 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/*