Upload Python Package to PYPI #18
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: Upload Python Package to PYPI | |
on: | |
release: | |
types: [created] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Miniconda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: 3.11 | |
channels: conda-forge | |
auto-update-conda: true | |
miniconda-version: "latest" | |
activate-environment: pypi | |
- name: Set up Conda environment and build package | |
shell: bash -l {0} | |
run: | | |
conda config --set always_yes yes --set changeps1 no | |
conda install -q -n pypi python=3.11 \ | |
setuptools \ | |
pypandoc \ | |
build | |
python -m build . | |
- name: Publish | |
uses: pypa/gh-action-pypi-publish@release/v1 |