Upload PyPI Release #7
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 Release | |
on: | |
workflow_dispatch: | |
release: | |
types: [ published ] | |
jobs: | |
upload_pypi: | |
name: Building Package | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.10'] | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 # full history for setuptools_scm | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-variant: Mambaforge | |
mamba-version: "*" | |
use-mamba: true | |
channels: conda-forge,bioconda | |
channel-priority: strict | |
environment-file: environment.yaml | |
python-version: ${{ matrix.python-version }} | |
activate-environment: ymp | |
- name: Install Twine | |
run: | | |
pip install --user twine | |
- name: Install | |
run: | | |
pip install --no-deps . | |
- name: Build Source Package | |
run: | | |
./setup.py sdist | |
- name: Build Wheel | |
run: | |
./setup.py bdist_wheel | |
- name: Publish | |
if: startsWith(github.event.ref, 'refs/tags') && github.event_name == 'push' | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} | |
#repository_url: https://test.pypi.org/legacy/ |