Skip to content

Release

Release #41

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
build-and-deploy-documentation:
name: Build Sphinx Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Build
run: |
pip install -e ".[doc]"
cd docs
make clean
make html
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BASE_BRANCH: master
BRANCH: gh-pages
FOLDER: docs/_build/html
deploy-to-pypi:
name: Upload Package to PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
- name: Write version
run: python update_version.py $GITHUB_REF
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
twine upload dist/*
- name: Commit version bump
run: |
git config --global user.name "Github Action"
git config --global user.email "[email protected]"
git commit -am "Bump version"
git push