try another python build variant #14
This file contains hidden or 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: 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: Install build | |
| run: | | |
| pip install build | |
| - name: Build sdist | |
| run: python -m build --sdist -n | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-sdist | |
| path: dist/*.tar.gz | |
| upload_pypi: | |
| name: Upload to PyPI | |
| needs: [build_sdist] | |
| runs-on: ubuntu-latest | |
| environment: test | |
| 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 | |