Skip to content

Update version and CHANGELOG for new release: v0.3.3. (#78) #9

Update version and CHANGELOG for new release: v0.3.3. (#78)

Update version and CHANGELOG for new release: v0.3.3. (#78) #9

Workflow file for this run

---
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
on: # NOLINT
push:
tags:
- "*"
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/cache@v3
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/cache@v3
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/cache@v3
if: startsWith(runner.os, 'Windows')
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install tools
if: startsWith(github.event.ref, 'refs/tags')
run: |
python -m pip install --upgrade setuptools
python -m pip install --upgrade wheel
- name: Build a binary wheel and a source tarball
if: startsWith(github.event.ref, 'refs/tags')
run: |
python setup.py sdist bdist_wheel
- name: Publish distribution 📦 to Test PyPI
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TEST_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
- name: Sphinx lint
uses: ammaraskar/sphinx-action@v1
with:
docs-folder: "docs/"
- name: Publish documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html
publish_branch: gh-pages