rel: 3.0.0-alpha.4 #828
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: PyPI | |
| on: | |
| push: | |
| branches: [main, dev, maint/*] | |
| tags: ['*'] | |
| pull_request: | |
| branches: [main, dev, maint/*] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build: | |
| name: Build packages | |
| runs-on: ubuntu-slim | |
| permissions: | |
| attestations: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - uses: hynek/build-and-inspect-python-package@d44ca7d91762de7a7d5436ddae667c6da6d1c3df # v2.18.0 | |
| with: | |
| attest-build-provenance-github: ${{ github.event_name != 'pull_request' }} | |
| test-wheel: | |
| name: Test wheel (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| needs: [build] | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - ubuntu-24.04-arm | |
| - windows-latest | |
| - macos-15-intel | |
| - macos-latest | |
| fail-fast: false | |
| steps: | |
| - name: Check out repository (with bids-examples submodule) | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| fetch-depth: 1 | |
| submodules: true | |
| - name: Download packages | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: Packages | |
| path: dist | |
| - uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | |
| - name: Install the wheel into an isolated environment | |
| run: | | |
| uv tool install dist/*.whl | |
| - name: Expose a `bids-validator` shim forwarding to bids-validator-deno | |
| run: | | |
| mkdir -p .shim | |
| echo -e '#!/usr/bin/env bash\nexec bids-validator-deno "$@"' > .shim/bids-validator | |
| chmod +x .shim/bids-validator | |
| echo "$PWD/.shim" >> "$GITHUB_PATH" | |
| - name: Show validator version | |
| run: bids-validator --version | |
| - name: Validate bids-examples via run_tests.sh | |
| working-directory: tests/data/bids-examples | |
| run: bash run_tests.sh | |
| test-publish: | |
| name: Publish to test.pypi.org | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| needs: [test-wheel] | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download packages | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: Packages | |
| path: dist | |
| - name: Upload package to PyPI | |
| uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| skip-existing: true | |
| publish: | |
| name: Publish | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
| runs-on: ubuntu-latest | |
| needs: [test-wheel] | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download packages | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: Packages | |
| path: dist | |
| - name: Upload package to PyPI | |
| uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 |