Skip to content

Update github actions #191

Update github actions

Update github actions #191

Workflow file for this run

name: Python Package
on:
push:
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python:
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install build dependencies
run: |
sudo apt-get update && \
sudo apt-get install -qy \
gettext \
libcairo2-dev \
gir1.2-girepository-2.0 \
libgirepository1.0-dev \
libgirepository-2.0-dev \
gir1.2-glib-2.0 libglib2.0-dev python3-gi \
pkg-config
- run: dpkg-query -L libgirepository1.0-dev
- run: echo $PKG_CONFIG_PATH
- run: echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig" >> $GITHUB_ENV
- run: pkg-config --list-all | grep girepository || true
- run: pkg-config --modversion girepository-1.0 || true
- run: pip install -U pip
- run: pip install setuptools wheel
- run: python setup.py sdist bdist_wheel
- run: pip install dist/*.whl
- run: pip install twine flake8
- run: twine check dist/*
- run: flake8
- run: python test/test_match.py
- uses: actions/upload-artifact@v4
with: {name: dist, path: dist/}
if: matrix.python == '3.12'
deploy:
name: Upload release
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v') && success()
environment:
name: pypi
permissions:
id-token: write
steps:
- uses: actions/[email protected]
with: {name: dist, path: dist/}
- uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/