Fix HRV tuple input handling #87
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: 📦 Release & Publish | |
| on: | |
| pull_request: | |
| push: | |
| branches: [master] | |
| tags: ["v*"] | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| # --- STAGE 1: Build Check (all PRs & master) --- | |
| build: | |
| name: 🔨 Build Package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: astral-sh/setup-uv@v5 | |
| - name: Build | |
| run: uv build | |
| # --- STAGE 2: Test Release (master only) --- | |
| publish-test: | |
| name: 🧪 Publish to TestPyPI | |
| needs: build | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: testpypi | |
| url: https://test.pypi.org/p/neurokit2 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: astral-sh/setup-uv@v5 | |
| - name: Build | |
| run: uv build | |
| - name: Publish to TestPyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| verbose: true | |
| password: ${{ secrets.TEST_PYPI_PASSWORD }} | |
| # --- STAGE 3: Production Release (tag only) --- | |
| publish-prod: | |
| name: 🚀 Publish to PyPI | |
| needs: publish-test | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/neurokit2 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: astral-sh/setup-uv@v5 | |
| - name: Build | |
| run: uv build | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| verbose: true | |
| password: ${{ secrets.PYPI_PASSWORD }} |