Skip to content

Ensure the analyzer and reporter can handle with action as a unique … #7

Ensure the analyzer and reporter can handle with action as a unique …

Ensure the analyzer and reporter can handle with action as a unique … #7

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*' # Trigger on version tags
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build
- name: Build wheel and sdist
run: python -m build
- name: Upload dist artifacts
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.python-version }}
path: dist/*
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all build artifacts
uses: actions/download-artifact@v4
with:
path: dist-all
- name: Combine all wheels and sdist
run: |
mkdir -p dist
find dist-all -type f -exec cp {} dist/ \;
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m pip install --upgrade pip
pip install twine
twine upload dist/*
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
docs:
needs: release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install MkDocs and Material theme
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material mkdocstrings mkdocstrings-python
- name: Deploy documentation to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mkdocs gh-deploy --force --clean --remote-branch gh-pages