Publish to PyPI #25
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
name: Publish to PyPI | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Miniconda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
channels: conda-forge, defaults | |
auto-activate-base: true | |
activate-environment: "" | |
- name: Source Miniconda | |
run: | | |
source $CONDA/etc/profile.d/conda.sh | |
conda activate | |
which python | |
python --version | |
echo $CONDA | |
conda install -n base conda-libmamba-solver | |
conda config --set solver libmamba | |
python -m pip install --upgrade pip | |
- name: Install DIALS environment and all dependencies | |
run: | | |
source $CONDA/etc/profile.d/conda.sh | |
conda activate | |
conda install -n base -c conda-forge -y dials | |
pip install -e ".[docs]" | |
cd docs | |
export SPHINXBUILD="$CONDA/bin/sphinx-build" | |
make clean | |
make html | |
pip install -U setuptools setuptools_scm wheel packaging twine typing-extensions tox tox-conda myst-parser docutils | |
- name: Build the Python package | |
run: | | |
source $CONDA/etc/profile.d/conda.sh | |
conda activate | |
pip list | |
tox -e build | |
tox -e docs | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |