Skip to content

chore(deps): bump actions/upload-artifact from 3 to 4 #31

chore(deps): bump actions/upload-artifact from 3 to 4

chore(deps): bump actions/upload-artifact from 3 to 4 #31

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@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: 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@v3
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 }}