1.1.7 #12
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: | |
release: | |
types: [published] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: cache poetry install | |
uses: actions/cache@v2 | |
with: | |
path: ~/.local | |
key: poetry-1.4.2-0 | |
- name: setup poetry | |
uses: snok/install-poetry@v1 | |
with: | |
poetry-version: 1.4.2 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: cache deps | |
id: cache-deps | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: pydeps-${{ hashFiles('**/poetry.lock') }} | |
- name: build and publish pypi | |
env: | |
PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
poetry config pypi-token.pypi $PYPI_TOKEN | |
poetry version ${{ github.ref_name }} | |
poetry publish --build | |
poetry install --no-interaction --no-root | |
poetry run jake ddt --output-format json -o bom.json --whitelist whitelist.json | |
- name: update version | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Automatic version bump | |
branch: main | |
file_pattern: pyproject.toml | |
- name: build docs | |
run: | | |
mkdir gh-pages | |
touch gh-pages/.nojekyll | |
cd docs | |
poetry install --no-interaction | |
poetry run make clean html | |
cp -r _build/html/* ../gh-pages/ | |
- name: publish docs | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: gh-pages | |
- name: sbom | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: bom.json | |
asset_name: bom.json | |
tag: ${{ github.ref }} |