v1.0.0 #6
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: Publish Python Package | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read | |
| jobs: | |
| release-build: | |
| runs-on: ubuntu-latest | |
| # PyPI use trusted publisher | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install uv | |
| uv venv | |
| make dev | |
| - name: Build | |
| run: | | |
| make build | |
| - name: Validate | |
| run: | | |
| WHEEL=$(ls dist/*.whl | head -n 1) | |
| python -m pip install "${WHEEL}" | |
| python -c "from oci_genai_auth import OciSessionAuth; from oci_genai_auth import OciUserPrincipalAuth; import oci_genai_auth;" | |
| # - name: Publish to Test PyPI | |
| # run: | | |
| # python -m pip install twine | |
| # twine check dist/* | |
| # twine upload --verbose -r testpypi dist/* | |
| - name: Publish to PyPI | |
| run: | | |
| python -m pip install twine | |
| twine check dist/* | |
| twine upload --verbose dist/* |