Publish release to PyPI #22
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: Publish release to PyPI | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish_release_to_pypi: | |
name: Build and publish a release to PyPI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install Poetry | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: "1.3.2" | |
- name: Install dependencies | |
run: poetry install | |
- name: Build HTTP documentation | |
run: npx @redocly/cli build-docs http-api.yml --output docs/http-api.html | |
- name: Build python reference | |
run: | | |
poetry run pdocs as_markdown blueye.sdk -o docs/reference | |
rm docs/reference/blueye/sdk/index.md | |
- name: Build documentation for publishing | |
run: poetry run mkdocs build --no-directory-urls --site-dir blueye.sdk_docs | |
- name: Build package with poetry, including documentation | |
run: poetry build | |
- name: Publish to PyPI | |
run: poetry publish --username __token__ --password ${{ secrets.PYPI_TOKEN }} |