Skip to content

Delete python-publish.yml #2

Delete python-publish.yml

Delete python-publish.yml #2

Workflow file for this run

name: Publish to PyPI
on:
push:
branches: [ main ]
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build-and-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}