* Fix bool Python ser bug #10
Workflow file for this run
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
| # CI pipeline for nf-python | |
| name: nf-python Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| validate-version: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Extract version from pyproject.toml | |
| id: pyproject | |
| run: | | |
| version=$(grep '^version' py/pyproject.toml | head -1 | cut -d '"' -f2) | |
| echo "version=$version" >> $GITHUB_OUTPUT | |
| - name: Extract version from git tag | |
| id: tag | |
| run: | | |
| tag_version=${GITHUB_REF##*/} | |
| tag_version=${tag_version#v} | |
| echo "version=$tag_version" >> $GITHUB_OUTPUT | |
| - name: Check versions match | |
| run: | | |
| if [ "${{ steps.pyproject.outputs.version }}" != "${{ steps.tag.outputs.version }}" ]; then | |
| echo "pyproject.toml ${{ steps.pyproject.outputs.version }} and git tag ${{ steps.tag.outputs.version }} do not match!" | |
| exit 1 | |
| fi | |
| echo "All versions match: ${{ steps.pyproject.outputs.version }}" | |
| build-pypi: | |
| needs: validate-version | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Build Python package | |
| run: | | |
| cd py | |
| pip install build | |
| python -m build | |
| - name: Archive Python dist | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: py/dist/* | |
| publish-pypi: | |
| needs: build-pypi | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi-publish | |
| url: https://pypi.org/p/nf-python-plugin/ | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download all the dists | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| - name: Publish distribution 📦 to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |