1.7.2 #44
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
python -m build | |
twine upload dist/* | |
- name: Commit version bump | |
run: | | |
git config --global user.name "Github Action" | |
git config --global user.email "push@example.com" | |
git commit -am "Bump version" | |
git push |