PyMax 2.1.0 #30
Workflow file for this run
This file contains hidden or 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] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| release-checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: "3.10" | |
| enable-cache: true | |
| - name: Check lint | |
| run: uv run ruff check src tests | |
| - name: Check formatting | |
| run: uv run ruff format --check src tests | |
| - name: Run tests | |
| run: uv run pytest | |
| - name: Build docs | |
| run: uv run sphinx-build -b html docs /tmp/pymax-docs | |
| release-build: | |
| runs-on: ubuntu-latest | |
| needs: release-checks | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: "3.10" | |
| enable-cache: true | |
| - name: Build release distributions | |
| run: uv build | |
| - name: Check distributions | |
| run: uv run twine check dist/* | |
| - name: Upload distributions | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-dists | |
| path: dist/ | |
| pypi-publish: | |
| runs-on: ubuntu-latest | |
| needs: release-build | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/maxapi-python/ | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Retrieve release distributions | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: release-dists | |
| path: dist/ | |
| - name: Publish release distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |