Skip to content

Faster tests

Faster tests #237

Workflow file for this run

name: Build tar and wheel
on:
push:
branches:
- publish
tags:
- "*"
pull_request: # also build on PRs touching this file
paths:
- "./.github/workflows/release.yml"
- "pyproject.toml"
jobs:
build_wheels:
name: Build wheel and source dist
runs-on: ubuntu-lts-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Build wheels
run: |
python -m pip install wheel build
python -m build .
- uses: actions/upload-artifact@v6
with:
path: ./dist/*
retention-days: 5
publish:
name: Publish on GitHub and PyPI
needs: [build_wheels]
runs-on: ubuntu-lts-latest
# release on every tag
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v8
with:
name: artifact
path: dist
- name: Get Asset name
run: |
export PKG=$(ls dist/ | grep tar)
set -- $PKG
echo "name=$1" >> $GITHUB_ENV
- name: Upload Release Assets to PyPI
uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: __token__
password: ${{ secrets.pypi_password }}
skip_existing: true