Skip to content

test

test #6

Workflow file for this run

name: Release
on:
push:
tags:
- test-v*
release:
types:
- "published"
env:
TARGET_INDEX: ${{ !contains(github.ref_name, 'test') && startsWith(github.ref_name, 'v') && 'pypi' || 'testpypi' }}
jobs:
pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
environment:
name: ${{ env.TARGET_INDEX }}

Check failure on line 18 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 18, Col: 13): Unrecognized named-value: 'env'. Located at position 1 within expression: env.TARGET_INDEX .github/workflows/release.yml (Line: 29, Col: 14): Unexpected symbol: ')'. Located at position 31 within expression: env.TARGET_INDEX == 'testpypi') && '--index testpypi'
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- run: uv build
- name: Smoke test (wheel)
run: uv run --isolated --no-project -p 3.13 --with dist/*.whl --with pytest pytest tests/test_base.py
- name: Smoke test (source distribution)
run: uv run --isolated --no-project -p 3.13 --with dist/*.tar.gz --with pytest pytest tests/test_base.py
- run: uv publish --trusted-publishing always ${{ env.TARGET_INDEX == 'testpypi') && '--index testpypi' }}