Skip to content

chore(deps): bump actions/setup-python from 4 to 5 (#19) #34

chore(deps): bump actions/setup-python from 4 to 5 (#19)

chore(deps): bump actions/setup-python from 4 to 5 (#19) #34

Workflow file for this run

name: Build (and Upload) Python Package
on:
release:
types: [published]
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
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: Twine check
run: python -m twine check --strict dist/*
- uses: actions/upload-artifact@v4
with:
name: python-dist
path: dist
publish:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: python-dist
path: dist
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}