Skip to content

Deploy Python package to PyPI #38

Deploy Python package to PyPI

Deploy Python package to PyPI #38

Workflow file for this run

name: Deploy Python package to PyPI
on:
release:
types: [created]
jobs:
build-n-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution package to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
repository_url: https://test.pypi.org/legacy/
environment: pypi

Check failure on line 42 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / Deploy Python package to PyPI

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yml (Line: 42, Col: 9): Unexpected value 'environment' .github/workflows/deploy.yml (Line: 43, Col: 9): Unexpected value 'permissions'
permissions:
id-token: write
- name: Publish distribution package to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
environment: pypi
permissions:
id-token: write