Skip to content

v0.0.2

v0.0.2 #3

Workflow file for this run

---
name: Publish Python package to PyPI
on: # yamllint disable-line rule:truthy
release:
types: [published]
permissions:
contents: read
env:
POETRY_VERSION: '2.1.3'
PYTHON_VERSION: '3.13'
jobs:
build:
name: Build the package distribution
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4.2.2
with:
ref: ${{ github.ref_name}}
- name: Setup Python
uses: actions/setup-python@v5.6.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: snok/install-poetry@v1.4.1
with:
version: ${{ env.POETRY_VERSION }}
virtualenvs-create: true
virtualenvs-in-project: true
- name: Perform package installation
run: poetry install --no-interaction
- name: Run tests
run: poetry run pytest
- name: Build the package distributions
run: poetry build --no-interaction
- uses: actions/upload-artifact@v4.6.2
with:
name: pyambit-dist
path: dist
if-no-files-found: error
retention-days: 1
overwrite: true
publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs: build
environment:
name: pypi
url: https://pypi.org/p/pyambit
permissions:
id-token: write
steps:
- name: Retrieve the package distributions
uses: actions/download-artifact@v4.3.0
with:
name: pyambit-dist
path: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@v1.12.4