Skip to content

Commit

Permalink
Update python-package-conda.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rcervinoucm authored Jun 3, 2024
1 parent 1943165 commit 16b4293
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,31 @@ jobs:

pypi-publish:
name: Publish release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/ctlearn
permissions:
id-token: write
strategy:
matrix:
os: [ubuntu-22.04]
pyv: [3.9, '3.10', 3.11, 3.12]
max-parallel: 5
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
conda env update --file environment.yml --name base
- name: Build package
run: |
python setup.py sdist bdist_wheel # Could also be python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.pyv }}
run: |
conda install -y python=${{ matrix.pyv }}
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
- name: Build package
run: |
python setup.py sdist bdist_wheel # Could also be python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 16b4293

Please sign in to comment.