Skip to content

use pypi

use pypi #94

name: Python Package using Conda
env:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest tests"
on: [push]
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge
channel-priority: true
activate-environment: tyssue
environment-file: environment.yml
- name: install tyssue github action
shell: bash -l {0}
run: pip install -v .[dev]
- name: Lint with flake8
shell: bash -l {0}
run: |
mamba install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
shell: bash -l {0}
run: |
mamba install pytest
make test
make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Optional, use if you use setuptools_scm
submodules: true # Optional, use if you have submodules
- name: Build SDist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
upload_all:
needs: [build_wheels, make_sdist]

Check failure on line 65 in .github/workflows/python-package-conda.yml

View workflow run for this annotation

GitHub Actions / Python Package using Conda

Invalid workflow file

The workflow is not valid. .github/workflows/python-package-conda.yml (Line: 65, Col: 13): Job 'upload_all' depends on unknown job 'build_wheels'.
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1