Skip to content

Generate Docs

Generate Docs #35

Workflow file for this run

# name: Generate Docs
# on:
# push:
# branches: [ stable ]
# workflow_dispatch:
# jobs:
# docs:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python 3.9
# uses: actions/setup-python@v5
# with:
# python-version: 3.9
# - name: Build
# run: |
# sudo apt-get install pandoc
# python -m pip install --upgrade pip
# pip install -e .[dev]
# make docs
# - name: Deploy
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{secrets.GITHUB_TOKEN}}
# publish_dir: docs/_build/html
name: Release
on:
release:
types: [published]
workflow_dispatch:
inputs:
candidate:
description: 'If true, this creates a release candidate.'
required: true
type: boolean
default: true
test_pypi:
description: 'If true, this will push to the test pypi instead of regular.'
type: boolean
default: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.candidate && 'main-clone' || 'stable' }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[dev]
- name: Create wheel
run: |
make dist
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ inputs.test_pypi && secrets.TEST_PYPI_API_TOKEN || secrets.PYPI_API_TOKEN }}
repository-url: ${{ inputs.test_pypi && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/' }}
- name: Bump version to next candidate
if: ${{ inputs.candidate && !inputs.test_pypi }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
make bumpversion-candidate
make git-push