adapt pdal-plugins dist builder #15
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: '3.12' | |
| use-mamba: true | |
| auto-update-conda: true | |
| environment-file: .github/environment.yml | |
| - name: Install dependencies | |
| shell: bash -l {0} | |
| run: | | |
| python -m pip install build pipx twine | |
| pipx run build --sdist -Ccmake.define.CMAKE_BUILD_WITH_INSTALL_RPATH=ON | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-sdist | |
| path: dist/*.tar.gz | |
| - name: Publish package distributions to PyPI | |
| if: github.event_name == 'release' && github.event.action == 'published' | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |