Skip to content

Release 3.4.0: agent-native forensics workflow #11

Release 3.4.0: agent-native forensics workflow

Release 3.4.0: agent-native forensics workflow #11

Workflow file for this run

name: Publish to PyPI
on:
push:
tags:
- "v*"
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
- run: python -m pip install -U pip
- run: python -m pip install -e ".[dev]"
- run: pytest -q
- name: Require an explicit public license
run: |
test -f LICENSE || {
echo "Refusing production publish: add the selected public LICENSE file first."
exit 1
}
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
- run: python -m pip install -U build twine
- run: python -m build
- run: python -m twine check --strict dist/*
- uses: actions/upload-artifact@v6
with:
name: python-package-distributions
path: dist/
if-no-files-found: error
publish:
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v6
with:
name: python-package-distributions
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1