Skip to content

add build step to workflow #5

add build step to workflow

add build step to workflow #5

Workflow file for this run

name: PyPI
on:
pull_request:
push:
branches:
- main
tags:
- v*
jobs:
build:

Check failure on line 12 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 12
runs-on: ubuntu-latest
- 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:
if: !startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/dispatch-functions
permissions:
contents: read
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:
contents: read
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1