Skip to content

Publish releases to PyPI #14

Publish releases to PyPI

Publish releases to PyPI #14

Workflow file for this run

name: Publish releases to PyPI
on:
workflow_run:
workflows: ["Check and create tag"]
types:
- completed
branches:
- master
jobs:
package_build:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Build and publish to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/vswobbly
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build setuptools twine
continue-on-error: false
- name: Build wheel and source distribution
run: |
python -m build --wheel --sdist --outdir dist/
continue-on-error: false
- name: Check the output
run: |
python -m twine check --strict dist/*
continue-on-error: false
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1