Skip to content

we need a full environment to build source #11

we need a full environment to build source

we need a full environment to build source #11

Workflow file for this run

name: Release
on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/release.yml'
push:
branches:
- main
paths:
- '.github/workflows/release.yml'
release:
types:
- published
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup environment
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Miniforge3
miniforge-version: latest
python-version: ${{ matrix.python-version }}
use-mamba: true
auto-update-conda: true
environment-file: .github/environment.yml
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
upload_pypi:
needs: [build_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
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