git-authors v0.8.0 #23
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: Upload Python Package | |
on: | |
workflow_dispatch: | |
release: | |
types: [created] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Make sure unit tests succeed | |
run: | | |
git config --global user.name "Github Action" | |
git config --global user.email "githubaction@gmail.com" | |
pip install -r tests/test_requirements.txt | |
pip install mkdocs-material | |
pip install . | |
pytest | |
- name: Build package | |
run: | | |
python setup.py sdist bdist_wheel | |
# See https://docs.pypi.org/trusted-publishers/using-a-publisher/ | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- name: Deploy mkdocs site | |
run: | | |
mkdocs gh-deploy --force |