1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
name: build
on: [push]
permissions:
id-token: write
jobs:
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Show ref
run: |
echo "$GITHUB_REF"
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.13'
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update -y -qq
sudo apt-get install -y -qq libicu-dev
pip install --upgrade pip wheel build twine hatchling
pip install -e ".[dev]"
- name: Validate mypy typing
run: |
make typecheck
- name: Run unit tests
run: |
make test
- name: Build a distribution
run: |
python3 -m build --wheel
- name: Publish a Python distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
verbose: true
|