Update VERSION #30
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
| name: Publish to PyPi | |
| permissions: | |
| actions: write | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| pypi-release: | |
| name: PyPi Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - name: Checkout styx | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 'styx-api/styx' | |
| path: 'styx' | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| pyproject-file: "styx/pyproject.toml" | |
| - name: Compile | |
| run: | | |
| uv --directory styx run ../build.py | |
| - name: Build Python packages | |
| run: | | |
| # First, see what packages we have | |
| echo "Available packages in dist/niwrap-python/:" | |
| ls -la dist/niwrap-python/ | |
| # Create a directory for the built packages | |
| mkdir -p dist/built_packages | |
| # Build each package using uv | |
| for pkg_dir in dist/niwrap-python/*/; do | |
| echo "Building package in $pkg_dir" | |
| cd "$pkg_dir" | |
| # Build source distribution and wheel using uv | |
| uv build --sdist --wheel -o ../../built_packages | |
| cd - # Return to original directory | |
| done | |
| # Verify built packages | |
| echo "Built packages:" | |
| ls -la dist/built_packages/ | |
| - name: Publish to PyPi | |
| id: pypi_publish | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_TOKEN }} | |
| verbose: true | |
| packages-dir: dist/built_packages |