Skip to content

Commit

Permalink
Merge pull request #140 from EricR86/master
Browse files Browse the repository at this point in the history
Add wheel to pypi upload in github actions
  • Loading branch information
dpryan79 authored Mar 15, 2023
2 parents 961f97d + f00e5cd commit 96b951c
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,30 @@ jobs:
name: upload to pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup conda
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Install build prerequisites
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
run: |
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
- name: create env
python -m pip install --upgrade twine build cibuildwheel numpy
- name: sdist
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
run: |
export PATH=$HOME/miniconda/bin:$PATH
conda create -n foo -q --yes -c conda-forge -c bioconda python=3.7 twine numpy libcurl curl zlib
- name: sdist
python -m build --sdist
- name: wheel
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
run: |
export PATH=$HOME/miniconda/bin:$PATH
source activate foo
rm -f dist/*
python setup.py sdist
python -m cibuildwheel --output-dir wheelhouse
- name: upload
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
export PATH=$HOME/miniconda/bin:$PATH
source activate foo
twine upload dist/*
twine upload wheelhouse/*

0 comments on commit 96b951c

Please sign in to comment.