Skip to content

fix syntax error in pypi.yml #6

fix syntax error in pypi.yml

fix syntax error in pypi.yml #6

Workflow file for this run

name: PyPI
on:
pull_request:
push:
branches:
- main
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
- run: python -m pip install build --user
- run: python -m build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist
test:

Check failure on line 30 in .github/workflows/pypi.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pypi.yml

Invalid workflow file

You have an error in your yaml syntax on line 30
if: !startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/dispatch-functions
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
release:
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://pypi.org/p/dispatch-functions
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1