openai/openai-python
Publicmirrored fromhttps://github.com/openai/openai-pythonAvailable
.github/workflows/publish-pypi.yml
28lines · modecode
| 1 | # workflow for re-running publishing to PyPI in case it fails for some reason |
| 2 | # you can run this workflow by navigating to https://www.github.com/openai/openai-python/actions/workflows/publish-pypi.yml |
| 3 | name: Publish PyPI |
| 4 | on: |
| 5 | workflow_dispatch: |
| 6 | |
| 7 | jobs: |
| 8 | publish: |
| 9 | name: publish |
| 10 | runs-on: ubuntu-latest |
| 11 | environment: publish |
| 12 | |
| 13 | steps: |
| 14 | - uses: actions/checkout@v4 |
| 15 | |
| 16 | - name: Install Rye |
| 17 | run: | |
| 18 | curl -sSf https://rye.astral.sh/get | bash |
| 19 | echo "$HOME/.rye/shims" >> $GITHUB_PATH |
| 20 | env: |
| 21 | RYE_VERSION: '0.35.0' |
| 22 | RYE_INSTALL_OPTION: '--yes' |
| 23 | |
| 24 | - name: Publish to PyPI |
| 25 | run: | |
| 26 | bash ./bin/publish-pypi |
| 27 | env: |
| 28 | PYPI_TOKEN: ${{ secrets.OPENAI_PYPI_TOKEN || secrets.PYPI_TOKEN }} |
| 29 | |