publish to pypi #17
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: workflow_dispatch | |
jobs: | |
build-and-publish: | |
name: build and publish | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
environment-file: environment.yml | |
activate-environment: lhorizon | |
auto-update-conda: false | |
python-version: 3.11 | |
- name: Set up conda environment | |
shell: bash -l {0} | |
run: | | |
python -m pip install -e . | |
conda list | |
- name: install build | |
run: conda install -n lhorizon build | |
- name: build binary & source | |
shell: bash -l {0} | |
run: | | |
conda activate lhorizon | |
python -m build --sdist --wheel --outdir dist/ | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |