Skip to content

split build and publish steps #1246

split build and publish steps

split build and publish steps #1246

name: Publish python distributions to PyPI
on: push
jobs:
build:
name: Build and publish python distributions to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python -m build
publish-to-pypi:
name: Publish python distribution to PyPI
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/triage
permissions:
id_token: write

Check failure on line 33 in .github/workflows/publish-to-pypi.yml

View workflow run for this annotation

GitHub Actions / Publish python distributions to PyPI

Invalid workflow file

The workflow is not valid. .github/workflows/publish-to-pypi.yml (Line: 33, Col: 7): Unexpected value 'id_token'
steps:
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1