use file version info #7
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: | |
| push: | |
| branches: [ "git-workflow" ] | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read | |
| jobs: | |
| release-build: | |
| runs-on: ubuntu-latest | |
| 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: | | |
| python -m pip install dist/*.whl | |
| python -c "import oci_openai;" | |
| - name: Publish to Test PyPI | |
| run: | | |
| python -m pip install twine | |
| twine check dist/* | |
| twine upload --verbose -r testpypi dist/* | |
| # - name: Publishto PyPI | |
| # run: | | |
| # pip install twine | |
| # twine upload dist/* |