Skip to content

fix/ghactions-pre-commit-no-run-after-merge #2

fix/ghactions-pre-commit-no-run-after-merge

fix/ghactions-pre-commit-no-run-after-merge #2

Workflow file for this run

---
name: Publish Python 🐍 distributions 📦 to PyPI
on:
pull_request:
branches:
- main
types: [closed]
jobs:
build-n-publish:
if: ${{ github.event.pull_request.merged }}
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: 3.11
- name: Install pip packages
run: pip install twine build setuptools
- name: Build the package
run: python -m build
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true